Defining the API routes
One of the most important aspects of our API are routes that we take to create, read, update, and delete our speakers.
Our routes are based on the HTTP verb used to access our API, as shown in the following examples:
- To create record, use the POST verb
- To read record, use the GET verb
- To update record, use the PUT verb
- To delete records, use the DELETE verb
So, our routes will be as follows:
Routes |
Verb and Action |
---|---|
|
GET retrieves speaker's records |
|
POST inserts speakers' record |
|
GET retrieves a single record |
|
PUT updates a single record |
|
DELETE deletes a single record |
Configuring the API routes:
- Let's start ...
Get Learning Single-page Web Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.