~/netref / HTTP / HTTPS
##

HTTP / HTTPS

A stateless request/response protocol over TCP (HTTP/1.1, /2) or QUIC (HTTP/3). HTTPS is simply HTTP carried inside a TLS tunnel on port 443.

// request → response

Browser
DNS resolve
TCP + TLS
GET /index
200 OK + body
Request line + headers + optional body → status line + headers + body. Keep-alive reuses the TCP/TLS connection for the next request.
// methods
GETRetrieve — safe & idempotent
POSTCreate / submit — not idempotent
PUTReplace — idempotent
PATCHPartial update
DELETERemove — idempotent
HEADHeaders only, no body
OPTIONSAllowed methods / CORS preflight
// status code classes
1xxInformational — 100 Continue, 101 Switching
2xxSuccess — 200 OK, 201 Created, 204 No Content
3xxRedirect — 301 Moved, 302 Found, 304 Not Modified
4xxClient error — 400, 401, 403, 404, 429
5xxServer error — 500, 502, 503, 504
// protocol versions
HTTP/1.01996One request per connection
HTTP/1.11997Keep-alive, pipelining, Host header, chunked
HTTP/22015Binary, multiplexed streams, header compression (HPACK)
HTTP/32022Runs on QUIC (UDP 443) — no head-of-line blocking
// common headers
HostTarget virtual host (required in 1.1)
Content-TypeMIME type of the body
AuthorizationCredentials / bearer token
Cache-ControlCaching directives
Set-CookieServer stores session state
User-AgentClient identification