← Quiz: REST APIs: all 10 questions
Quiz: REST APIs · Question 10 of 10
What does ResponseEntity.created(uri).body(course) send?
What does ResponseEntity.created(uri).body(course) send?
- A.200 OK and the course
- B.204 No Content
- C.302 redirect to the URI
- D.201 Created with a Location header pointing to the new course, plus the body
Answer & explanation
Correct answer: 201 Created with a Location header pointing to the new course, plus the body
Clients learn where the new resource lives from the Location header.
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 →