Hypertext Transfer Protocol (or HTTP) is the foundation of data transfer for the World Wide Web. Such protocols are structured text that uses logical links (hyperlinks) between nodes containing certain data. Thus, this is a way to exchange or transmit hypertext.
The HTTP protocol works as a request-response function in a client-server computing model. So, the web browser acts as a client, and the site hosting is the server. The client sends an HTTP request message to a server that provides certain resources (for example, HTML files and other materials), and then returns a response message. The response contains information about the request, and may also contain the requested content in the body of the message.
The browser is a basic example of a user agent (client). Other types of user agents include software used for indexing by search providers, mobile applications, and other resources that use or display web content.
The HTTP protocol is designed to provide intermediate network elements to enhance or provide communication between clients and servers. High traffic sites often benefit from the cache of web servers that display content on behalf of higher resources, reducing load time. The web browser cache allows the user to reduce network traffic. Proxies that use the HTTP protocol on the local network can provide communication for clients that do not allow global routing of addresses by relaying messages from external servers.
An HTTP session is a sequential process of requests and responses. The client initiates the request by creating a TCP connection to a specific port on the server, and the latter listens on this port and waits for a message with the request. When it is received, the server sends a response message in the status bar . The body of this message is typically the requested resource, although an error message or other information may also be displayed.
If we consider the purpose of the HTTP protocol, it should be noted that it defines methods to indicate the desired action to be performed on the identified resources. The type of information displayed (previously existing data or generated dynamically) depends on the server implementation. Often such a resource corresponds to a file or script located on the hosting.
Some methods that use the HTTP hypertext transfer protocol are designed only for information retrieval and should not change the state of the server. In other words, they do not have a significant impact, with the exception of the relatively harmless effects - caching or increasing visit statistics.
On the other hand, the HTTP protocol can also use methods that are designed for actions that can affect either the server or other external resources - to activate financial transactions or perform email transfer. Occasionally, such methods are used by web robots or some sites and can make requests regardless of the main task.