This article was automatically translated from the original Turkish version.
HTTP (Hyper-Text Transfer Protocol) is an application-layer communication protocol for distributing and accessing hypermedia systems via common. HTTP forms the foundation of data communication. It is an application-layer protocol designed to transfer information between Ağa connected devices and operates above other layers of the network protocol stack. An HTTP exchange involves a client machine making a request to a server and subsequently receiving a response message. It was first developed in the 1990s by Tim Berners-Lee and is regarded as a cornerstone of the internet.
HTTP is based on the client-server model. In this model, the client is typically a web browser and the server is a computer hosting a web page or application. The client sends HTTP requests and the server responds with appropriate HTTP responses.
An HTTP communication consists of the following steps:
1- Request Transmission: The client sends an HTTP request to access a specific URL.
2- Server Processing: The server processes the request received from the client and prepares an appropriate response.
3- Response Transmission: The server sends the prepared response back to the client. This response may typically be a web page, JSON data, or another file type.
An HTTP request is the mechanism by which web browsers like request information from internet communication platforms to load a website. Every HTTP request made over the internet carries a set of encoded data containing various types of information. A typical HTTP request includes:
The HTTP method specifies the action the client expects the queried server to perform. For example, among the most common common HTTP methods are “GET” and “POST”; a “GET” request expects information in return (typically a web page), while a “POST” request typically indicates that the client is sending information to the web server.
Examples of HTTP methods:
HTTP headers are text information stored as key-value pairs and are included in every HTTP request. These headers convey essential information such as which browser the client is using and what data is being requested.
Example of an HTTP request header from Google Chrome’s Network tab:
The body of a request is the part that contains the data being transmitted. The HTTP request body may include information such as a username and password sent to the web server or other data entered into a form.
Responses from the server to client requests are typically accompanied by a situation status code. Status codes are divided into five categories.
“xx” represents any number between 00 and 99.
Some common HTTP status codes include:
Example of an HTTP request header:
The HTTP request sent by an internet browser to Google.com is processed by the web application and returns an HTTP response containing the search results place. The structure of the HTTP response returned by Google.com is as follows:
The first line in the response header, “HTTP/1.1 200 OK”, indicates that the request was successfully processed by the server. The section immediately following the header, beginning with “html>”, contains the HTML code that enables the display of google.com search results for “akadema” in the web browser.
How HTTP Works
HTTP Methods
HTTP Request Header
HTTP Body
HTTP Status Codes
Structure of an HTTP Request
Structure of an HTTP Response
Advantages of HTTP
Disadvantages of HTTP