Defining Todo APIs Routes
January 26th 2021 90

I like to begin by defining my APIs
. As it is very important for a developer to first think of how the API endpoints
are going to look like and what they do, also they should be easy to remember and easy to use. The table below shows what APIs we need to create and what each does.
Method |
Path |
Description |
GET |
/todos |
Get all todos items |
GET |
/todos/:id |
Get one todo item |
POST |
/todos |
Create a new todo item |
PUT |
/todos/:id |
Update a todo item |
DELETE |
/todos/:id |
Delete a new todo item |
Having defined our APIs, let's delve in to the project directories in next section.