Posted by:
Comments:
0
Post Date:
10 Jan 2020
REST is often mistaken, whereas it only specifies the way the paths and verbs are constructed and used to handle resources exposed over HTTP endpoints.
GET | A GET method (or GET request) is used to retrieve a representation of a resource. It should be used SOLELY for retrieving data and should not alter. |
PUT | A PUT method (or PUT request) is used to update a resource. You can update this specific resource by using the "put" method to update resource with a new version of a resource - given its complete representation provided in the request. We should avoid creating resources by using POST. |
POST | A POST method (or POST request) is used to create a resource OR to perform arbitrary action on a resource (other than modifying it, updating it, or deleting it). You can use the POST method to post it to a URL and let the server decide the address of a new resource. |
PATCH | A PATCH method (or PATCH request) is used to modify a resource. Patch request should contain only the changes to the resource, instead of the complete resource - in order to perform a partial update of an existing resource. |
DELETE | A DELETE method (or DELETE request) is used to delete a resource identified by its location. |
- Comments
- Leave a Comment