Mapa mental
REST
Contenido del mapa
REST
It is an interface to connect various systems based on the HTTP protocol
- It helps us to obtain and generate data and operations, returning that data in very specific formats.
Different clients hit the same REST endpoints, perform the same actions, and receive the same responses
RESTful
- Reliability
- Fast performance
- Scalability
- As components that can be
- managed, update, reuse
- without affecting the entire system
- managed, update, reuse
Clients send requests to retrieve or modify resources and servers send responses to these requests
- Making Requests
- The client makes a request to the server to retrieve or modify data on the server
- an HTTP verb
- a header
- a path to a resource
- an optional message body containing data
- The client makes a request to the server to retrieve or modify data on the server
- HTTP Verbs
- GET
- retrieve a specific resource (by id) or a collection of resources
- POST
- create a new resource
- PUT
- update a specific resource (by id)
- DELETE
- remove a specific resource by id
- GET
- Headers and Accept parameters
- In the request header, the client sends the type of content that it can receive from the server
- It is called Acceptcampo and guarantees that the server does not send data that the client cannot understand or process
- MIME
- They are used to specify the content types in the Accept field, they consist of a and typea subtype. They are separated by a slash (/).
- image
- image/png, image/jpeg,image/gif
- audio
- audio/wav,audio/mpeg
- video
- video/mp4,video/ogg
- application
- application/json, application/pdf, application/xml,application/octet-stream
- image
- They are used to specify the content types in the Accept field, they consist of a and typea subtype. They are separated by a slash (/).
- MIME
- It is called Acceptcampo and guarantees that the server does not send data that the client cannot understand or process
- In the request header, the client sends the type of content that it can receive from the server
- Making Requests
Paths
- Requests must contain a path to a resource on which the operation must be performed.
- The routes must contain the information necessary to locate a resource with the necessary degree of specificity.
Sending Responses
- Content Types
- In cases where the server sends a data payload to the client, the server must include a content-type in the response header.
- header content-type field alerts the client about the type of data it is sending in the response body.
- These content types are MIME types
- The content-type that the server returns in the response must be one of the options that the client specified in the accept field of the request
- These content types are MIME types
- header content-type field alerts the client about the type of data it is sending in the response body.
- In cases where the server sends a data payload to the client, the server must include a content-type in the response header.
- Response Codes
- Server responses contain status codes to alert the client to information about the success of the operation.
- For each HTTP verb, there are expected status codes that a server should return if it succeeds
- GET
- return 200 (OK)
- POST
- return 201 (CREATED)
- PUT
- return 200 (OK)
- DELETE
- return 204 (NO CONTENT)
- GET
- For each HTTP verb, there are expected status codes that a server should return if it succeeds
- Server responses contain status codes to alert the client to information about the success of the operation.
- Content Types
Información
- Descripción
- Mapa Mental sobre REST, creado por JOHN ALEJANDRO AVILA DIAZ el 01/12/2021.
- Creado por
- JOHN ALEJANDRO AVILA DIAZ
- Visitas
- 1
- Valoración