How to complete the challenge PUT /todos body id (200)
Issue a PUT request to /todos and include the id of an existing todo in the request body.
This API allows the identifier for a PUT update to come from the payload, so /todos can update a specific todo when the body contains an existing id.
Basic Instructions
- Send
PUT /todos - Add an
X-CHALLENGERheader to track challenge completion - Set
Content-Typetoapplication/json - Include an
idfor an existing todo in the JSON payload - Include a valid
titlebecause this API treats PUT as a replacement update - Verify the response status is
200
Example body:
{
"id": 3,
"title": "updated using body id",
"doneStatus": true,
"description": "updated by PUT /todos"
}
Try it now
If you don't know what todos are available then you can check by GET /todos. See the solution.
GET /todos to see what todos are available now
If you have already deleted all todos, create one using POST /todos. See the solution.