badge icon

This article was automatically translated from the original Turkish version.

Article

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

How HTTP Works

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:

  • HTTP version type
  • URL
  • HTTP method
  • HTTP request header
  • Optional HTTP body 

HTTP Methods 

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:

  • GET: Used to request data from the server. For example the GET method can be used to load a web page. 
  • POST: Used to send data to the server. Form submissions are carried out using this method. 
  • PUT: Used to update a specific resource. 
  • DELETE: Used to delete a specific resource. 
  • HEAD: Used to retrieve only header information from the server. 


HTTP Request Header

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


HTTP Body

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.


HTTP Status Codes 

Responses from the server to client requests are typically accompanied by a status code. Status codes are divided into five categories. 

  • 1xx Informational
  • 2xx Success
  • 3xx Redirection
  • 4xx Client Error 
  • 5xx Server Error


“xx” represents any number between 00 and 99. 


Some important HTTP status codes are:

  • 200 OK: The request was successfully processed. 
  • 404 Not Found: The requested resource was not found. 
  • 500 Internal Server Error: An error occurred on the server. 
  • 301 Moved Permanently: The requested resource has been permanently moved to another URL.
  • 400 Bad Request: An invalid request was sent. 


Structure of an HTTP Request

Structure of an HTTP request

Example of an HTTP request header:

Structure of HTTP request header

  • Action used in the HTTP request: GET
  • Server to which the request is sent: google.com
  • Target resource requested from the server: /complete/search
  • Parameters sent to the server: q=akadema&cp=7&client=psy-ab&xssi=t&gs_ri=gws-wiz&hl=tr&authuser=0&psi=bqCpXc2nF4jQrgSb-qyQBQ.1571397742719&ei=bqCpXc2nF4jQrgSb-qyQBQ
  • HTTP version used: HTTP/1.1
  • Information about the web browser used (User-Agent): The Apple Mac OS X (10.14.6) operating system is running Google Chrome (77.0.3865.120) web browser. 


Structure of an HTTP Response

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. 


Advantages of HTTP

  • Simplicity: It has a simple structure and is easy to implement. 
  • Flexibility: It supports the transfer of many different data types including text images video and more. 
  • Widespread Use: It is used across nearly the entire internet. 


Disadvantages of HTTP

  • Security Vulnerability: Data is not encrypted making HTTP an insecure protocol. Therefore HTTPS should be used. 
  • Statelessness: HTTP does not maintain the state of connections. Each request is independent which can lead to additional complexity in certain scenarios. 



Bibliographies

Anadolu Üniversitesi. "Web Nasıl Çalışır?" Accessed [Date]. https://canvas.anadolu.edu.tr/courses/83/pages/web-nasil-calisir?module_item_id=514772

TurkNet. (2022). *HTTP ve HTTPS Nedir?*https://turk.net/blog/http-ve-https-nedir/

Author Information

Avatar
AuthorBeyza Nur TürküJuly 15, 2026 at 4:57 AM

Discussions

No Discussion Added Yet

Start discussion for "HTTP Protocol" article

View Discussions

Contents

  • 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