Deep dive into HTTP

HTTP Request:

HTTP request comprises of the following:-

  • Start-line — This describes the HTTP Method (such as Get, Put, or Post), the request-target (such as an URL, or Port), and the HTTP version (such as HTTP/1.1). This start-line is always a single line.
  • Request Headers — An optional set of HTTP headers specifying the request. Types of Headers are explained below..
  • Blank Line This confirms that all the request meta-data has been sent.
  • Body (Optional) — This contains all the data associated with the request. There are typically two categories explained below..

HTTP Response:

HTTP response comprises of the following:-

  • Start-line — This usually includes the HTTP protocol version (HTTP/1.1), a status code (such as 200 or 404), and a textual description of the status code (such as “ok”).
  • Response Headers — An optional set of HTTP headers specifying the request. There are multiple different types of headers:
  • Body — This contains all the data associated with the request. There are typically two categories:

History of HTTP:-

  • HTTP 0.9 (1991) — It consisted of a single line containing a GET method and the path of the requested document. The response was just returning a single hypertext document without headers or any other metadata.
  • HTTP 1.0 (1996) — Addition was Request headers and Response headers. Also, the new response headers allowed multiple file types, such as HTML, plain text, images, and more.
  • HTTP 1.1 (1997) — This new version becomes the Internet Standard. This version added many performance enhancements, such as keepalive connections, caching mechanisms, request pipelining, transfer encodings, and byte-range requests.
  • HTTP 2.0 (2015) — This improved the performance of HTTP.
  • HTTP 3.0 (Late 2019) — Based on the QUIC protocol, explained below.

More About HTTP 2.0 — Majorly Used

The key differences HTTP/2 has to HTTP/1.x are as follows:

  • It is binary, instead of textual
  • It is fully multiplexed, instead of ordered and blocking
  • It can use one connection for parallelism
  • It uses header compression to reduce overhead
  • It allows Server Pushing to add responses proactively into the Browser cache.

Future is Here — HTTP 3.0

HTTP/3 is an evolution of the QUIC (Quick UDP Internet Connections) protocol from Google, first suggested by Mark Nottingham in October 2018.

  • Dramatically reduced connection establishment time
  • Improved congestion control
  • Multiplexing without head-of-line blocking
  • Forward error correction
  • Connection migration

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhay Jain

Abhay Jain

Developer with 3 yrs of industrial experience in developing scalable web applications.