Request Line RFC 9110
GET /index.html HTTP/1.1\r\n
| Method | Safe | Idempotent | Body |
GET | Yes | Yes | No |
HEAD | Yes | Yes | No |
POST | No | No | Yes |
PUT | No | Yes | Yes |
DELETE | No | Yes | No |
OPTIONS | Yes | Yes | Optional |
Request Headers field-name: field-value
Host: example.com\r\n
User-Agent: Mozilla/5.0\r\n
Accept: text/html,application/xhtml+xml\r\n
Accept-Language: en-US,en;q=0.9\r\n
Accept-Encoding: gzip, deflate, br\r\n
Connection: keep-alive\r\n
\r\n
| Header | Default (if omitted) |
Host | Required in HTTP/1.1 |
Connection | keep-alive |
Accept | */* |
Accept-Encoding | identity (no compression) |
Cache-Control | heuristic caching |
Status Line RFC 9110
| Range | Class | Example |
1xx | Informational | 100 Continue |
2xx | Success | 200 OK, 201 Created |
3xx | Redirection | 301 Moved, 304 Not Modified |
4xx | Client Error | 400 Bad Request, 404 Not Found |
5xx | Server Error | 500 Internal, 503 Unavailable |
Response Headers field-name: field-value
Date: Fri, 27 Dec 2025 12:00:00 GMT\r\n
Content-Type: text/html; charset=utf-8\r\n
Content-Length: 1256\r\n
Server: Apache/2.4\r\n
Cache-Control: max-age=3600\r\n
\r\n
| Header | Default (if omitted) |
Content-Type | application/octet-stream |
Content-Length | chunked or connection close |
Transfer-Encoding | identity |
Connection | keep-alive |
Message Structure Content-Type, Content-Length
| Extension | Content-Type |
.html | text/html |
.css | text/css |
.js | text/javascript |
.json | application/json |
.png | image/png |
| (unknown) | application/octet-stream |
URL Structure RFC 3986
| Scheme | Default Port |
http | 80 |
https | 443 |
ftp | 21 |