What is REST?
REST is a software architecture pattern for creating web-based services. This means that resources are represented by a specific URL endpoint, for example, website.com/post/12459
, where a website's post can be accessed by using its specific ID. REST is the method of mapping resources to URL endpoints.
A related concept in the area of database management is that of CRUD (create, read, update, and delete). These are the four ways in which you can interact with database resources. Similarly, there are also four ways in which we generally interact with resource objects defined by our API endpoints. The HTTP protocol has built-in methods that facilitate tasks such as POST
, GET
, PUT
, and DELETE
.
The functionalities of the previously mentioned tasks are as follows:
POST
: Creates an object resourceGET
: Retrieves information about the object resourcePUT
: Updates a specific object's informationDELETE
: Removes a specific object
Additional...