GoConqr has a new look! Let us know what you think.

Mind map

What is REST?

JOHN FREDDY BUITRAGO QUEVEDO Spanish

Map content

What is REST?

  1. Paradigm

  2. REpresentational State Transfer

  3. It is an architectural style for providing standards between computer systems on the web

  4. They are characterized by how they are stateless and separate the concerns of client and server

    • The implementation of the client and the implementation of the server can be done independently.
      • Without each knowing about the other
      • The code on the client side can be changed at any time without affecting the operation of the server
        • And vice versa
      • They can be kept modular and separate
        • But, they have to know what format of messages to send to the other
        • This improve the flexibility of the interface across platforms
        • This improve scalability by simplifying the server components
        • The separation allows each component the ability to evolve independently
    • The server does not need to know anything about what state the client is in and vice versa.
      • The server and the client can understand any message received, even without seeing previous messages
  5. Clients send requests to retrieve or modify resources, and servers send responses to these requests.

    • Requests
      • An HTTP verb, which defines what kind of operation to perform
        • There are 4 basic 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
      • A header, which allows the client to pass along information about the request
        • The client sends the type of content that it is able to receive from the server
        • This is called the Accept field
          • It ensures that the server does not send data that cannot be understood or processed by the client
          • The options for types of content are MIME Types
          • For example, a text file containing HTML would be specified with the type text/html
      • A path to a resource
        • 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.
        • The first part of the path should be the plural form of the resource.
          • fashionboutique.com/customers/223/orders/12
        • Paths should contain the information necessary to locate a resource with the degree of specificity needed.
      • An optional message body containing data
  6. Sending Responses

    • 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.
      • This content-type header field alerts to the type of data it is sending in the response body.
      • Content types are MIME Types
      • 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.
    • Response Codes
      • Responses from the server contain status codes
      • Alert the client to information about the success of the operation.
      • The most common ones codes
        • 200 (OK) standard response for successful HTTP requests
        • 201 (CREATED) standard response for an HTTP request that resulted in an item being successfully created.
        • 204 (NO CONTENT) standard response for successful HTTP requests, where nothing is being returned in the response body.
        • 500 (INTERNAL SERVER ERROR) The generic answer for an unexpected failure if there is no more specific information available.

Information

Description
Mind Map on What is REST?, created by JOHN FREDDY BUITRAGO QUEVEDO on 31/05/2021.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?