🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: HTTP Methods, Status Codes and Headers: all 10 questions

Quiz: HTTP Methods, Status Codes and Headers · Question 9 of 10

Which URL design follows REST conventions for enrolling in course 7?

Which URL design follows REST conventions for enrolling in course 7?

  1. A.GET /api/enrol?course=7
  2. B.POST /api/doEnrolment
  3. C.POST /api/courses/7/enrolments
  4. D.PUT /api/enrolNow/7
Answer & explanation

Correct answer: POST /api/courses/7/enrolments

A POST to the enrolments collection under the course creates a new enrolment.

Can you get the rest right without peeking?

Take the timed Quiz: HTTP Methods, Status Codes and Headers quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →