sajad torkamani

HTTP is an application-layer protocol and so sits at the top of the TCP/IP suite.

TCP IP Suite

A protocol is defined as:

a system of rules that explain the correct conduct and procedures to be followed in formal situations.

Merriam-Webster

Consider a typical HTTP request-response interaction:

  • The client sends an HTTP request to the server using a carefully formatted message that the server will understand.
  • The server responds by sending a carefully formatted message that the client will understand.
HTTP request and response cycle

HTTP’s role in this interaction is to define the format of the message before it is encapsulated, encoded into binary, and transmitted over the wire by lower-level layers. Without a standardized format, the server won’t understand what the client sent and vice versa.

It’ll be as if a Chinese person asks an Italian in Mandarin what the time is. The Italian will have no clue! In short, HTTP provides a common language so that clients and servers can understand each other.

Tagged: HTTP