Académique Documents
Professionnel Documents
Culture Documents
PREV NEXT
⏮ ⏭
Characteristics of REST services GET
🔎
Header information
REST
Action
Verb
The status of these operations can be known from HTTP status codes. Whenever
a client initiates a REST operation, since REST is stateless, the client should
know a way to find out whether the operation was successful or not. For that
reason, HTTP responses have a status code. REST defines a few standard status
code types for a given operation. This means a REST API should strictly follow
the following rules to achieve stable results in client-server communication.
There are three important ranges available based on the types of error. See the
following table for error ranges:
Status
Number
Code Action
Range
Type
The detail of what each status code does is very precisely defined, and the overall
count of codes increases every year. We mention the important ones in the
upcoming section.
All requests to REST services have the following format. It consists of the host
and the API endpoint. The API endpoint is the URL path that is predefined by the
server. It can also include optional query parameters.
Let's look at all the verbs in more detail. The REST API design starts with the
defining of operations and API endpoints. Before implementing the API, the
design document should list all the endpoints for the given resources.
In the following section, we carefully observe the REST API endpoints using
PayPal's REST API as a use case.
You have 2 days le in your trial, Reddychan. Subscribe today. See pricing options.
https://learning.oreilly.com/library/view/hands-on-restful-web/9781838643577/85f14d60-d4bf-447a-87a9-0cc4b14a62d6.xhtml 1/1