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

Mind map

WHAT IS REST?

TABARES ROMERO DIEGO MAURICIO English

Map content

WHAT IS REST?

  1. Is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other

  2. CHARACTERISTICS

    • Separation 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.
        • Benefits
          • kept modular and separate
          • improve scalability by simplifying the server components.
          • , the separation allows each component of the ability to evolve independently.
          • different clients hit the same REST endpoints, perform the same actions, and receive the same responses.
    • Statelessness
      • Meaning that 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.
          • Benefits
            • RESTful applications achieve 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.
  3. Communication between Client and Server

    • clients send requests to retrieve or modify resources, and servers send responses to these requests
      • REST requires that a client make a request to the server in order to retrieve or modify data on the server. A request generally consists of:
        • an HTTP verb, which defines what kind of operation to perform
        • a path to a resource
        • an optional message body containing data
        • a header, which allows the client to pass along information about the request
  4. HTTP Verbs

    • There are 4 basic HTTP verbs we use in requests to interact with resources in a REST system:
      • GET — retrieve a specific resource (by id) or a collection of resources
      • POST — create a new resource
      • DELETE — remove a specific resource by id
      • PUT — update a specific resource (by id)
  5. 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.
      • Accept field
        • ensures that the server does not send data that cannot be understood or processed by the client.
      • 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
  6. 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.
        • fashionboutique.com/customers/223/orders/12
      • Paths should contain the information necessary to locate a resource with the degree of specificity needed.
  7. 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.
        • This 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.
    • Response Codes
      • Responses from the server contain status codes to alert the client to information about the success of the operation.
        • 200 (OK)
        • 201 (CREATED)
        • 204 (NO CONTENT)
        • 400 (BAD REQUEST)
        • 403 (FORBIDDEN)
        • 404 (NOT FOUND)
        • 500 (INTERNAL SERVER ERROR)

Information

Description
Mind Map on WHAT IS REST?, created by TABARES ROMERO DIEGO MAURICIO on 13/05/2020.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?