We are going to use the first four of the most commonly used HTTP verbs for Create, Read, Update and Delete (CRUD) operations:
- GET: This method retrieves an existing resource. It returns 200 OK if the resource exists, 404 Not Found if it does not exist, and 500 Internal Server Error for other errors.
- PUT: This updates a resource. It returns 200 OK if successfully updated, 201 Created if a new resource is created, 404 Not found if the resource to be updated does not exist, and 500 Internal Server Error for other unexpected errors.
- POST: This creates a resource with an identifier generated at the server side. It returns 201 CREATED if a new resource is created, 200 OK if the resource has been updated ...