🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: REST APIs: all 10 questions

Quiz: REST APIs · Question 3 of 10

What does @RequestBody do?

What does @RequestBody do?

  1. A.Sends the response body as XML
  2. B.Converts the JSON request body into a Java object
  3. C.Reads a value from the URL path
  4. D.Validates the request headers
Answer & explanation

Correct answer: Converts the JSON request body into a Java object

Jackson deserialises the body into the parameter's type.

Can you get the rest right without peeking?

Take the timed Quiz: REST APIs quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →