HTTP: How It Is Built

A request and a response.

Request/response line, headers and a body.

Lines delimited by the CRLF characters (0x0d, 0x0a)
Browser → Server

Specify the method: GET, POST, HEAD, OPTIONS, etc.

Specify the location: a URL/URI (Unified Resource Locator/Identifier).

Tell the server more stuff how you want the data: headers.

Provide optional body.
Browser ← Server

The server responds with status code: 2xx (ok), 3xx, 4xx, 5xx (not ok).

It is followed by extra information: headers.

There is also optional body.
Summary

Plain text format made of lines.

Lines are segmented by the CRLF characters. (carriage return, line feed)

Each part made of initial line, headers and a body.

Guarantees simple implementation across different technologies.

hat tip: Websecurify