Hypertext transfer protocol

  • Sprouting
  • c.

The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used to load webpages using hypertext links. HTTP is an application layer protocol designed to transfer information between networked devices and runs on top of other layers of the network protocol stack.

What is HTTP?

The hypertext transfer protocol (HTTP) is a request-response system in the client-server model that defines how data is transmitted across the Internet. HTTP enables hypertext to reference other resources with hyperlinks (URLs that use the http URI scheme).

Request

Typically, a HTTP request contains 3 structural components:

  1. Request line: contains the method, target URI, and the version.
  2. Headers: metadata key-value pairs about the client and its request.
  3. Body: optional data payload, dependant on the method used.

Example

A HTTP GET request to example.com using the curl command-line tool.

GET / HTTP/1.1
Host: example.com
User-Agent: curl/8.7.1
Accept: */*

Response

Typically, a HTTP response contains 3 structural components:

  1. Status line: contains the version, status code, and reason.
  2. Headers: metadata key-value pairs about the server and its response.
  3. Body: optional data payload, dependant on the request type.

Example

A HTTP response to a GET request to example.com using the curl command-line tool.

HTTP/1.1 200 OK
Content-Type: text/html
Connection: keep-alive
Last-Modified: Wed, 26 Aug 2026 20:16:59 GMT
Allow: GET, HEAD
Accept-Ranges: bytes
Age: 1923
<!doctype html><html lang="en"><head><title>Example Domain</title><link rel="icon" href="data:,"><meta name="viewport" content="width=device-width, initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://iana.org/domains/example">Learn more</a></p></div></body></html>