Protocols

HyperText Transfer Protocol (HTTP)

HTTP, the Hypertext Transfer Protocol facilitates every transaction over the World Wide Web and is used to define how requests and responses between servers and browsers are transmitted and formatted.

Common HTTP methods

  • GET
  • POST
  • PUT
  • DELETE
  • CONNECT
  • HEAD
  • OPTIONS
  • TRACE

HTTP works based on a request/response pair, every interaction starts with a request using one of the HTTP methods and ends with a response containing an HTTP status code.

HTTP by nature is a stateless protocol with each request/response pair being unique and independent of other requests/responses.

If state is important in a web application, HTTP sessions are used to store state between the browser and the server by transmitting information in cookies about where the user is in a sequence of events.

HTTP headers can include additional information such as:

  • What type of client sent the request
  • Server information
  • Time and date of the response
  • Duration of data storage
  • Data format
  • Cookies used to track sessions
GET the specified resource, if available.
Create a new resource and add it to a collection.
Update an existing singleton resource based on ID.
Modify an existing singleton resource based on ID.
Delete a singleton resource based on ID.

The difference between the HTTP versions

HTTP/1.1HTTP/2 > HTTPS
Uncompressed headersUses compression algorithms to speed up requests
Transfers one file at a timeEncryption over HTTPS
No default encryptionSupports multi-plexing / multiple files

HTTP Flow

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *