December 2021
Intermediate to advanced
510 pages
11h 20m
English
With the general structure of your API server ready, let’s add the CRUD operations for the to-do list. You’ll use the to-do API you developed in Defining the To-Do API.
Your to-do REST API supports these operations:
| Method | URL | Description |
|---|---|---|
| GET | /todo | Retrieve all to-do items |
| GET | /todo/{number} | Retrieve a to-do item {number} |
| POST | /todo | Create a to-do item |
| PATCH | /todo/{number}?complete | Mark a to-do item {number} as completed |
| DELETE | /todo/{number} | Delete a to-do item {number} |
The REST API serves all to-do--related content using the /todo URL path. It handles different operations based on the HTTP method, path, and parameters. The path may include a number for operations that act on a single to-do ...
Read now
Unlock full access