Representational State Transfer (REST) depends on HTTP protocol to transfer messages between the client and server. HTTP was originally designed to deliver HTML pages from web servers (servers) to browsers (clients), when requested. The pages represent a set of resources that the user wants to access, and are requested by Universal Resource Identifiers (URIs).
An HTTP request typically contains a method that indicates the type of operation that needs to be executed on the resource. For example, when visiting a website from your browser, you can see (in the following screenshot) that the method is GET:
The following are the most common HTTP methods, and their usage:
HTTP Method |
Action |
---|---|
GET |
The client will ask the server to retrieve the resource. |
POST |
The client will instruct the server to create a new resource. |
PUT |
The... |