This article was automatically translated from the original Turkish version.
HTTP (Hyper-Text Transfer Protocol) is an application-layer communication protocol designed for distributing and sharing hypermedia information systems. HTTP is the foundation of data communication. It is an application layer protocol developed to transfer information between networked devices and operates on top of other layers of the network protocol stack. An HTTP transaction 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 the cornerstone of the internet.
HTTP cycle
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 Submission: 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 and other internet communication platforms request information needed 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 HTTP methods “GET” and “POST”; a “GET” request expects information in return typically in the form of a website 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 with 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:
Example of HTTP request header
The body of a request is the part that contains the information being transmitted. The body of an HTTP request 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 status code. Status codes are divided into five categories.
“xx” represents any number between 00 and 99.
Some important HTTP status codes are:
Structure of an HTTP request
Example of an HTTP request header:
Structure of HTTP request header
The HTTP request sent by the internet browser to Google.com is processed by the web application and returns an HTTP response containing the search results. The structure of the HTTP response returned by Google.com will be as follows:
When examining the first line of the response header the expression HTTP/1.1 200 OK indicates that the request was successfully processed by the server. The section immediately following the header information and beginning with the html> tag contains the HTML code that enables the Google search results for “akadema” to be displayed in the internet browser.
Anadolu Üniversitesi. "Web Nasıl Çalışır?" Accessed [Date]. https://canvas.anadolu.edu.tr/courses/83/pages/web-nasil-calisir?module_item_id=514772
CloudFlare. "What is HTTP?"https://www.cloudflare.com/learning/ddos/glossary/hypertext-transfer-protocol-http/
TurkNet. (2022). *HTTP ve HTTPS Nedir?*https://turk.net/blog/http-ve-https-nedir/

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