1.3 – What is HTTP?



What is HTTP?

HTTP stands for Hyper Text Transfer Protocol.

HTTP is a protocol and main purpose of this protocol is to communicate in web by machines.

Hyper Text means a special text which has:

  • Link to other resources in the Internet.
  • It can include Videos, Images and Sounds.

Once this hyper text is stored in the server that is connected to the internet then using the HTTP protocol this Hyper Text can be exchanged between the computers.

In Short, HTTP carries the Hyper Text between the two computers to establish a communication.

It is a language that two machines speaks to exchange the Hyper Text over the web.

Learn more about What is Internet and Web from here.

How HTTP Works?

The Rule of HTTP is – ASK AND IT IS SERVED.

Hyper Text are available in the system which are connected to the Internet.

Someone needs to make a request to this machine and ask to fetch it. Then once the request is made it is served by sending the Hyper Text via the Response.

There are two roles involved in the HTTP process. First one is called a Requester and second is called as Provider.

Requester is the initiator of the request. One who ask for the resource.

Provider serves the request and provide the response to the requester.

So for HTTP protocol to work, Requester has to initiate the request by asking for a specific resource on that server and then Provider once received the request it will search and send that resource back to Requester.

If there is no requester then provider does nothing.

Summary:

  • Someone needs to initiate the request to access those resource on the server.
  • Server will respond and send that resource back as a Response.

All this is handled by the HTTP protocol.

Understand HTTP from your Browser

To see how request and response works. Try this live example from the chrome browser.

Exercise 1: How to Verify the Request and Response from the Browser

Step 1: Open the Chrome Browser

Open the Chrome Browser.

Step 2: Press CTRL + SHIFT + I to open the Inspect Mode

Once the Browser is open, Then press CTRL + SHIFT + I to open the Inspect Window

Step 3: Click on Network Tab in the Inspect

Click on Network on the Chrome Inspect Window.

Step 4: Type the Link.

Enter the Link in the Browser URL Bar.

https://www.srinivasit.com/

Step 5: Observe the Request and Response in Action

Click on the “sample.txt” file in the Network Tab. This will open up the Request and Response trace.

Now Click on “Headers” in the Right hand side tab.

In the Header Tab, Observe the Request information and Response Information.

Technical Definition

HTTP protocol helps to establish the communication between the Web Browser (Client) and the destination server.

Requester is the initiator of the request. One who ask for the resource.

Provider serves the request and provide the response to the requester.



Leave a Comment