badge icon

This article was automatically translated from the original Turkish version.

Article

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.


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 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:

  • 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 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:

  • GET: Used to retrieve 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 typically performed using this method.
  • PUT: Used to update a specific resource.
  • DELETE: Used to delete a specific resource.
  • HEAD: Used to retrieve only the header information from the server.


HTTP Request Header

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:


HTTP Body

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.


HTTP Status Codes

Responses from the server to client requests are typically accompanied by a situation 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 common HTTP status codes include:

  • 200 OK: The request was successfully processed.
  • 404 Not Found: The requested source 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

Example of an 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 with Google Chrome (77.0.3865.120) web browser is being used.


Structure of an HTTP Response

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.


Advantages of HTTP

  • Simplicity: It has a simple structure and is easy to implement.
  • Flexibility: It supports the transfer of many different data types (text, images, video, etc.)
  • 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.



Author Information

Avatar
AuthorBeyza Nur TürküJanuary 3, 2026 at 10:21 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

Ask to Küre