Mind map
REST
Map content
REST
Is an architectural style for providing standards between computer systems on the web.
SEPARATION OF CLIENT AND SERVER
- he code on the client side can be changed at any time without affecting the operation of the server and vice versa
- we improve the flexibility of the interface across platforms and improve scalability by simplifying the server components
- Additionally, 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
- 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.
- These constraints help RESTful applications achieve reliability, quick performance, and scalability
MAKING REQUESTS
- 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 header of the request, the client sends the type of content that it is able to receive from the server
- 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 (/).
- image — image/png, image/jpeg, image/gif
- audio — audio/wav, image/mpeg
- video — video/mp4, video/ogg
- application — application/json, application/pdf, application/xml, application/octet-stream
- 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 (/).
- The options for types of content are MIME
- In the header of the request, the client sends the type of content that it is able to receive from the server
- 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
- Example: fashionboutique.com/customers/223/orders/12
- REST requires that a client make a request to the server in order to retrieve or modify data on the server
- HTTP VERBS
SENDING RESPONSES
- CONTENT TYPES
- In cases where the server is sending a data payload to the client, the server must include a content-type in the header of the response
- 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.
- In cases where the server is sending a data payload to the client, the server must include a content-type in the header of the response
- RESPONSE CODES
- Responses from the server contain status codes to alert the client to information about the success of the operation
- GET — return 200 (OK)
- POST — return 201 (CREATED)
- PUT — return 200 (OK)
- DELETE — return 204 (NO CONTENT)
- Responses from the server contain status codes to alert the client to information about the success of the operation
- CONTENT TYPES
Information
- Description
- Mind Map on REST, created by AGUIAR MARCELLA LUIS CARLOS on 29/11/2019.
- Created by
- AGUIAR MARCELLA LUIS CARLOS
- Views
- 1
- Rating