How to complete the challenge GET /todos (200) vendor XML
This challenge requests a todo-specific +xml media type.
Issue a GET request on the
/todosend point with anAcceptheader ofapplication/vnd.apichallenges.todo+xmlto receive results in todo XML format.
Basic Instructions
- Issue a
GETrequest to/todos - Add the
X-CHALLENGERheader to track challenge completion - Set
Accepttoapplication/vnd.apichallenges.todo+xml - Check that the response status is
200 - Check that the response
Content-Typeisapplication/vnd.apichallenges.todo+xml
Try it now
GET /todos with vendor todo XML
Example Request
> GET /todos HTTP/1.1
> Host: apichallenges.com
> X-CHALLENGER: x-challenger-guid
> Accept: application/vnd.apichallenges.todo+xml
Example Response
< HTTP/1.1 200 OK
< Content-Type: application/vnd.apichallenges.todo+xml
< X-Challenger: x-challenger-guid
The response body should still contain a todo collection encoded as XML.
Lessons Learned
application/vnd.apichallenges.todo+xmlis accepted because the suffix is+xmland the subtype names thetodomodel.- Vendor media types let an API be more specific than generic
application/xml. - Explicit model support matters; not every
+xmlmedia type is a valid todo representation.
Suggested Experiments
- Try
Accept: application/vnd.apichallenges.todos+xmland compare plural model naming behavior. - Try
Accept: application/problem+xmland confirm that an error-document media type is not treated as todoXML. - Request the same collection with generic
application/xmland compare the body shape.