What is HTTP ?

Hasan Kayan
5 min readJan 24, 2023

HTTP(Hyper Text Transmission Protocol)

Such a huge computer network like internet cannot work without rules and irregularities. A set of methods and rules have been created to ensure that this network works correctly. These rules allow us to find exactly what we are looking for and get the information we want. We will check the basic protocol of data transfer in internet HTTP.

HTTP = “ Hyper Text Transmission Protocol”, as we understand from the name HTTP is a application layer protocol to data transfer between devices that interconnected each other by a network. In the normal working process, HTTP works when a device that wants to perform a transaction requests information from the server and the server transfers the relevant data to it. Of course there are regular systems to application of HTTP. A typical flow over HTTP involves a client machine making a request to a server, which then sends a response message.

Simple request-response process visualization.

HTTP Anatomy

HTTP basically have two component ; HEADER and BODY

HEADER

Header, contains the definition of a request mostly.

- Which method used = “POST”

- Which URL way should it follow = “login HTTP”

- What is HTTP version = “1.1”

- What is the domain = “Host: example.com”

  • Content type = “Content-Type : application/json”

— BODY

Body part of HTTP simply carries the main massage, at this section username label equalized to “mahmud” string and password label equalized to “pass123” string.

How do we create a HTTP request ?

A HTTP request helps us to get any information from the server in a valid format that we choose. HTTP request contains a structure;

  • HTTP version
  • URL
  • HTTP method
  • HTTP request header
  • HTTP body
  • Status

Now lets examine these terms step by step…

HTTP Versions

HTTP/0.9

HTTP has been evolving as technology evolves, first HTTP version was “HTTP/0.9”, this version was very simple and not completely functional. This version’s requests were only containing GET method and the path of source.

As request was simple but also the response of the server was not that satisfying, response was only including file itself.

As we mentioned HTTP/0.9 was not enough for some situations and browsers add this protocol some other features to make it more versatile.

HTTP/1.0

As we mentioned HTTP/0.9 was not enough for some situations and browsers add this protocol some other features to make it more versatile.

  • Each request contained the HTTP version information so system understood which protocol it should follow.
  • A status information code has been sent. This status code was carrying an information about the success of data transmission.
  • The concept of HTTP headers was introduced for both requests and responses.
  • Meta data transmission became possible and data transfer included wider area.
  • Thanks to content-type header, the documents without direct html files be able to transfer.

After HTTP/1.0 things got complicated and improved. HTTP transfer included different types of data and transfer became much more faster. There are four version of HTTP, we can use activley but there is a new version of it preparing for introduction with some serious improvments.

HTTP/1.1

HTTP/1.1 is the most recent version of the HTTP (Hypertext Transfer Protocol) protocol, which is used to transfer data over the internet. It is a request-response protocol, which means that a client sends a request to a server, and the server sends a response back to the client. HTTP/1.1 includes several new features and improvements over the previous version (HTTP/1.0), such as support for persistent connections, improved caching, and the ability to send multiple requests over the same connection. Additionally, HTTP/1.1 introduced the Host header, which allows a single IP address to host multiple web sites.

HTTP/2

HTTP/2 is the second major version of the HTTP protocol, and it was designed to address some of the limitations and issues of the previous version (HTTP/1.1). Some of the key features of HTTP/2 include:

  • Binary format: Unlike HTTP/1.1, which uses a plain text format, HTTP/2 uses a binary format, which is more efficient and less prone to errors.
  • Multiplexing: HTTP/2 allows multiple requests to be sent over the same connection, which can reduce the latency and improve the performance of web pages that have many resources (e.g. images, scripts, etc.).
  • Server push: HTTP/2 allows servers to “push” resources to the client, rather than waiting for the client to request them. This can further reduce the latency and improve the performance of web pages.
  • Header compression: HTTP/2 uses a compression algorithm called HPACK to compress the headers of requests and responses, which can reduce the amount of data that needs to be transferred.
  • Prioritization: HTTP/2 allows clients to indicate the priority of requests, so that the most important requests can be handled first.

It’s important to notice that in order to take advantage of these features, both the client and the server must support HTTP/2, and the communication must be done over a secure connection (HTTPS). It’s also important to mention that some of the features of HTTP/2, like multiplexing and server push, will have a different impact depending on the use case and the content of the website.

URL

A URL (Uniform Resource Locator) is a string of characters that specifies the location of a resource on the internet. It is commonly known as a “web address” or “web link”. A URL consists of several parts, including the protocol (e.g. “http” or “https”), the domain name (e.g. “example.com”), and the path (e.g. “/about”).

For example, the URL “https://www.example.com/about" specifies the location of a resource on the server “www.example.com" using the protocol “https” and the path “/about”. The protocol specifies how the resource should be accessed, and the domain name and path specify the location of the resource on the server.

URLs are often used to reference web pages, but they can also be used to reference other types of resources, such as images, videos, and files.

URLs play a crucial role in the World Wide Web, allowing users to access resources by clicking on links or typing the URL into their web browser.

Thank you for your time.

--

--