HTTP Stand for “Hyper Text Transfer Protocol” that basically is the protocol for transmitting the Hyperlink Text like Web Docs over a communication network between the Client and the Server. Till now HTTP has been Refined than the Previous Version which make it Simpler and Straight Forward to developer to Understand. The list of HTTP Version is HTTP 1 > HTTP 1.1 > HTTP 2 > HTTP 3. According to the context of Tech Jargons it said that Http means an Http Version 2. Overall, 80% of HTTP on the internet uses the version 2 with 20% for Http 1.1 which is the fallback and still being used today.
The basic working terminology of Http is that when the Client send the request to the server, first its setup the TCP Connection for overall reliability, ordered and error-check delivery of data. After that it establish the handshake connection between Client and Server to acknowledge the establishment of connection and ready to send and receive the data.
HTTP Request
In Http Request Header it contains to information that needed for server to evaluate the exchange of it information about Request and Response. It sends the payload of data to a server as a” request”. It contains such metadata for server to understand such as authority which is the webpage URL and user-agent can be defined as browser, and the things like what does it support and accept like text format , image types and encoding information so, that server can know what kind of response it has to be made based on the information provided in header metadata. The request contains many metadata most important to understand is Verb and the Path.
Verb and Path
The Http verb is also known as the crucial definition of what action that needed to perform by the server when getting the message from the Request Header. It can also be said as method. Here are the Most Common Verb and their roles are:
GET : Retrieves data from the server. For example, when you visit a web page, your browser sends a GET request to fetch the page content.
POST : Submits data to the server to create a new resource. For example, when you fill out and submit a form, the data is sent via a POST request.
PUT : Updates an existing resource on the server. For instance, updating your profile information might use a PUT request.
DELETE : Deletes a specified resource from the server. For example, when you delete a post, a DELETE request is sent.
PATCH : Partially updates an existing resource. It’s used when only a few fields of a resource need to be updated, rather than replacing the entire resource.
Path can simply be understood as URLs (Uniform Resource Locator) which specify the location of resource on the servers. These details come from the Domain Name and indicate where the resources are.
HTTP Response
When the server receives an HTTP request, it processes the request and send the respond back as HTTP Response to the client alongside the data that has been requested. The response consists of a Status line , headers and the message body.
When the execution is success, it returns the status code 200 OK which can also be known that the request was successful. Some of the Known Status Code are:
404 Not Found : The Requested resource is not found.
500 Internal Server Error : The server encountered an error.
400 Bad Request : The Server cannot process the request.
The server responded successfully with the requested webpage. It tells the browser what type of content it’s sending (HTML), how big it is, and when the response was sent. It uses strict security rules to protect your data, like ensuring secure connections (HTTPS) and preventing the page from being embedded elsewhere (for safety). The data is compressed to load faster, and caching is turned off to make sure you always get the latest version of the page. A cookie is set to help manage your session securely.