Mapa mental
What is REST?
Contenido del mapa
What is REST?
It means REpresentational State Transfer
Is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other
They are characterized by how they are stateless and separate the concerns of client and server
Separation of Client and Server
- The implementation of the server and the client can be done independently so one can be changed without affecting the other.
- Each side knows what format of messages to send to the other, so they can be kept modular and separate
- It improves the flexibility of the interface across platforms and improves scalability by simplifying the server components
- The separation allows each component the ability to evolve independently.
Statelessness
- The server does not need to know anything about what state the client is in and vice versa
- Both the server and the client can understand any message received, even without seeing previous messages
- They use resources to comunicate instead of commands. Resources are the nouns of the Web - they describe any object, document, or thing that you may need to store or send to other services
- REST systems interact through standard operations on resources, they do not rely on the implementation of interfaces
- RESTful applications have reliability, quick performance, and scalability, as components that can be managed, updated, and reused without affecting the system as a whole, even during operation of the system.
Comunitaction
- Making Requests
- REST requires that a client make a request to the server in order to manipulate the data
- 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
- Headers and Accept parameters
- In the header of the request, the client sends the type of content that it is able to receive from the server and is called Accept Field.
- The Accept field, and it ensures that the server does not send data that cannot be understood or processed by the client
- The MIME Types, used to specify the content types in the Accept field, consist of a type and a subtype. They are separated by a slash (/).
- Paths
- Requests must contain a path to a resource that the operation should be performed on
- Paths should be designed to help the client know what is going on
- Paths should contain the information necessary to locate a resource with the degree of specificity needed
- If trying to access a single resource, we would need to append an id to the path
- Sending Responses
- If the server is sending a data payload to the client, the server must include a content-type in the header of the response
- content-type header field alerts the client to the type of data it is sending in the response body
- The content-type that the server sends back in the response should be one of the options that the client specified in the accept field of the request.
- Making Requests
Información
- Descripción
- Mapa Mental sobre What is REST?, creado por DANIELA ABALLAY GARCIA el 15/05/2022.
- Creado por
- DANIELA ABALLAY GARCIA
- Visitas
- 0
- Valoración