Networking

HTTP

HTTP is the protocol browsers use to ask servers for pages and other resources. Every time you load a site, your browser sends HTTP requests.

Requests

A request has a method, a path, and headers.

GET /index.html HTTP/1.1
Host: example.com
Accept: text/html

Responses

The server replies with a status code and the content.

HTTP/1.1 200 OK
Content-Type: text/html

<!doctype html>...

Status codes