HTTP Protocols

Amritpal Singh
3 min readMar 16, 2020

--

Hello Everyone,

The internet and the web has been our generation’s ABCs. But have we ever sat down to wonder, how are we actually getting to the website we want?

While the topic is very wide, I wanted to share my knowledge on HTTP protocols. HTTP stands for Hypertext Transfer Protocol. A protocol is a set of rules and guidelines for communicating data.

In order for this website to pop up, there is communication between your browser aka the client and where all the data is stored, the server.

Client and Server Flow

How do they both communicate?

Client which talks in HTTP, send their specific needs using HTTP requests and verbs. The server gets the method, reacts and sends the response back to the client. Now, what exactly are those HTTP verbs?

Here is the list.

HTTP verbs

For example, this is the flatiron website.

learn.co

This was easy. But what really happens is that my browser sent a GET request to the flatiron website’s server. Proof you say?

When we open up the browser’s developer console and go to Network, we see what happens in the backend.

Developer Console showing the GET requests

Our browser wants to see the website and so it sent a GET request. The server then saw the request and reacted using the Status codes. As you can see in the image above, we see various 200 and 304. This code is made up of 3-digit integer in which the first tells us the class of response. The first digit can be one of five.

Status Code Explanation

How about if we want to send our data to the server? For example, if we were to sign up on Flatiron using our email and password, we are submitting a POST request.

Did you know?

  • GET request remains in the browser history and can be bookmarked

BUT

  • POST requests do not remain in the browser history and also cannot be bookmarked

As shown in the image at the beginning of this blog, there are many other methods in the HTTP family that are consistently used in communication by the client every day.

There you have it. I hope you found this blog helpful. If you’re having any difficulty or need more explanation, I’m more than happy to help you. Please connect with me on LinkedIn or my email is singhamritpal49@gmail.com.

Happy Coding :)

Resources

--

--