What is HTTP for Beginners
How do you access any resource on the Internet?
Well you might have guessed it,a web browser.
The internet is full of resources and these resources are hosted on different servers( a server is a piece of computer hardware or software that provides functionality for other programs or devices, called “clients”).Each of these resource has an address(the same way we reside in our unique addresses) called the URL(Uniform resource locator).The URL is the unique address where a particular content or resource resides.
The URL consists of 3 parts-
- The protocol(HTTP or HTTPS)
- The domain name(usually lands to the homepage-instagram.com in the example below)
- The path leading to a specific web page.

So how does browser access the resource?
In order to access any page the browser should follow the HTTP protocol.Protocols are set of rules which the client and server should follow in order to exchange information between them.
The browser is a software(for ex chrome) in a clients device(for ex PC or smartphone)which helps the client(user) access a web page(a www document).
In order to access any resource the browser requests data to the server.In order to request data the browser should follow some rules.That is when HTTP comes into picture.
The major HTTP requests are-
- GET
- POST
- PUT
- DELETE
GET-used by the client to request data from the server.
POST-when client wants to post some data to the server or the backend
PUT-when you update existing data entry on the backend.
RESPONSE CODES:
The response codes informs the client about the status of their request
200-Sucess-the data was received by frontend
400-Bad request-the backend did not understand the request
401-It represents unauthorized acess-the user is not authorized to access the response data.
404-The backend did not find the URL.
500-It represents something went wrong at the backend and the request cannot be completed.