Discovering REST and API
REST stands for Representational State Transfer and it is an architectural principle of the Web. In most of the cases, we have resources on the server that need to be created, fetched, updated, or deleted. The REST APIs provide mechanisms to perform all these operations. Every resource has its own URI and based on the request method, a different action occurs. For example, let's say that we need to manage the users in our social network. To retrieve information about a specific user, we will perform the GET
request to the /user/23
address, where the number, 23
, is the ID of the user. To update the data, we will send the PUT
request to the same URL, and to delete the record, we'll send the DELETE
request. The POST
requests are reserved to create new resources. In other words, the resources' management on the server happens via HTTP requests sent to carefully selected addresses by using the GET
, POST
, PUT
, and DELETE
methods, which are very often called
HTTP verbs...