Skip to main content

HTTP

Hypertext Transfer Protocol

Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/http

In short

HTTP is the protocol that browsers, apps, and servers use to exchange web pages and data through a simple cycle of requests and responses.

What is HTTP?

HTTP defines how a client, such as a browser or mobile app, asks a server for something and how the server replies. Every exchange is a request followed by a response, and each message is made of a start line, headers that carry metadata, and an optional body with the actual content.

A request names a method that describes the intended action, such as GET to read data, POST to create it, PUT or PATCH to update it, and DELETE to remove it. The response includes a status code that summarizes the result: 200 means success, 404 means not found, and 500 means the server hit an error.

HTTP is stateless, meaning each request stands alone and the server does not automatically remember earlier ones. Cookies and tokens are layered on top to keep users logged in. The protocol has evolved from HTTP/1.1 to HTTP/2 and HTTP/3, which move data more efficiently but keep the same methods, headers, and status codes.

HTTP is often confused with HTTPS. HTTPS is the same protocol sent through an encrypted TLS connection, so outsiders cannot read or tamper with the traffic; plain HTTP sends everything as readable text and should not be used for real websites.

At a glance

An HTTP exchange: the client sends a GET request with a method, a path and headers, and the server replies with the status code 200 OK, headers and a JSON body.ClientServerrequestGET /users/42 HTTP/1.1Host: api.example.comAccept: application/jsonmethod · pathheadersresponseHTTP/1.1 200 OKContent-Type: application/json{ "id": 42, "name": "Ada" }status codeheadersbody
Every HTTP exchange is one request and one response, each made of a start line, headers and an optional body.

Key takeaways

  • HTTP works as a series of requests and responses.
  • Methods like GET and POST describe the requested action.
  • Status codes like 200 and 404 summarize the result.
  • HTTP is stateless; cookies and tokens add memory between requests.
  • HTTPS is HTTP over an encrypted connection.

Example

A raw HTTP request and responsehttp
# Request sent by the client
GET /users/42 HTTP/1.1
Host: api.example.com
Accept: application/json

# Response sent back by the server
HTTP/1.1 200 OK
Content-Type: application/json

{"id": 42, "name": "Ada"}

Readers ask

What is the difference between HTTP and HTTPS?

HTTPS is HTTP sent over an encrypted TLS connection. It protects data from being read or modified in transit and proves to the browser that it is talking to the real website.

What does it mean that HTTP is stateless?

It means the server treats every request independently and does not remember earlier requests on its own. Applications use cookies, sessions, or tokens to recognize returning users.

What is the difference between GET and POST?

GET asks the server to return data and should not change anything, while POST sends data in the request body to create something or trigger an action.

Often compared

See also

Sources

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings