What is HTTP? – An Overview

HTTP stands for Hypertext Transfer Protocol. Before I explain what is HTTP, let’s define what is a protocol.

In the context of HTTP, a protocol is a system of rules. Rules that control the transmission of information from one computer to another.

Now, what is a hypertext?

Well, hypertext is a special text that you see on your computer or any other electronic device. This text allow you to access other texts or text documents through hyperlinks.

So, HTTP is a set of rules that allows web servers and web clients to transmit web documents to each other back and forth.

Examples of web clients are browsers such as Chrome, Firefox, etc. Think of web servers as computers. Computers that stores and displays web pages over the internet.

HTTP Requests & Responses

The communication of data between web clients and web servers takes place through requests and responses.

The web client or the browser sends HTTP request to the web server. The web server receives the request. Then runs an application in the background to process the client’s HTTP request.

In return, the web server sends a response back to the web browser as an output. The browser receives the output from the web server. Then displays the output.

HTTP

Human Readable

HTTP is human readable. It consists of plain language. It is easy for a person to understand the terms of an HTTP request methods. No need to understand too much about computer or networks.

Here are the human readable terms that an HTTP request consists of:

  • GET: This method is used to obtain data.
  • POST: The Hypertext Transfer Protocol request uses this method to transfer data to the server to create or update a resource.
  • PUT: This method is also used to transfer data to the server to create or update a resource. But there is a difference between PUT & POST. And the difference is that PUT requests are idempotent. No matter how many PUT requests are made, the end result will be the same. PUT method does not create he same resource multiple times.
  • DELETE: For deleting a specific resource.
  • CONNECT: The HTTP CONNECT opens a tunnel to the destination server defined by the targeted resource. HTTP CONNECT can be used to access sites that use SSL encryption.
  • TRACE: Useful for debugging. Echoes back the exact request message to the user, that the web server received.
  • OPTIONS: Describes the communication options or requirements for the target resource.
  • HEAD: Identical to GET method, but without any response body.

Stateless Protocol

In Hypertext Transfer Protocol, each request gets processed independently without any information of the requests that have been processed before it.

Furthermore, It also means that a request does not connect to any other request.

Every request the client sends over the protocol is unique and independent. Thus, HTTP follows a stateless protocol.

Session

Sessions in HTTP allows web server to retain user information during the user’s interaction with a website or a web application.

The session allows the web server to store user data during the request/response interactions. The interactions between the client and the web application. The web server stores the information persistently during the whole time the user interacts with a web application.

The web server stores information of the session itself. For example, session identifier, session creation time, etc.

Every time the client makes an HTTP request to the web server, the web server passes a session ID.

HTTP Headers

Headers provide crucial information in the request and response message of the Hypertext Transfer Protocol.

These headers provide useful information regarding the client, server configuration, the time and date of the response message, data storage on the client’s side, formats of data, cookies stored during the session, etc.

HTTP
Fig: HTTP Header

Conclusion

Hypertext Transfer Protocol is fairly a broad concept. Certainly, confusing you with every bit of information on this article is definitely not my goal.

However, I do believe that the information here are fairly basic and general. Good enough to give you an overview of how it works and what it is.

Feel free to let me know in the comment section if you have any questions or concerns.

Further Reading

Hypertext Transfer Protocol | Mozilla Web Docs

Leave a Reply