1 of 4

Your RightSignal

How the internet works · 5 of 101 / 3

HTTP

The concept

What your browser actually says to a server when you open a page

HTTP (HyperText Transfer Protocol) is the format a browser uses to ask a server for something: one request in, one response out. After DNS and a TCP connection, it sends plain text like "GET /news HTTP/1.1" and "Host: example.com".

The first line holds the method (GET fetches, POST sends data such as a form), the path (/news) and the version. Headers follow as "Name: value" lines, such as Host, which names the site wanted.

The server answers with a status line such as "HTTP/1.1 200 OK", its own headers (like "Content-Type: text/html", saying what kind of file follows) and then the body: here, the HTML of the news page.