// HTTP HEADER CHEAT SHEET
You clicked header.name in code. Now read about headers.
In HTTP, a request or response carries metadata in headers — key-value pairs likeContent-Type or Authorization. In code, that map is usually called header, and its name field is — you guessed it — header.name.
Request headers
Sent by the client
| Accept | Media types the client can understand |
| Accept-Encoding | Compression the client supports (gzip, br) |
| Authorization | Credentials or bearer token |
| Cache-Control | Caching directives (no-cache, max-age) |
| Content-Type | Media type of the request body |
| Cookie | Session cookie sent by the client |
| Host | Target host and port (required, HTTP/1.1) |
| Origin | Origin of the request (CORS) |
| Referer | Previous page URL |
| User-Agent | Client software identifier |
Response headers
Sent by the server
| Cache-Control | How the response may be cached |
| Content-Type | Media type of the response body |
| ETag | Validator for conditional requests |
| Location | Redirect target (3xx) |
| Server | Server software identifier |
| Set-Cookie | Cookie to store client-side |
| WWW-Authenticate | Challenge for authentication (401) |
| X-Forwarded-For | Client IP seen by origin (via proxy) |
// header.name IN THE WILD
JavaScript (Fetch API)
const res = await fetch('https://api.example.com', {
headers: { 'Content-Type': 'application/json' }
})
const type = res.headers.get('content-type')Python (requests)
import requests
r = requests.get('https://api.example.com',
headers={'Accept': 'application/json'})
print(r.headers.get('content-type'))Go (net/http)
req.Header.Get("Content-Type")
// header.name — the Name property of a Header mapRust (axum)
HeaderMap::from(&req.headers()) // headers.get(header::CONTENT_TYPE)
This page exists because .name is a real TLD and auto-linkers turnheader.name into a link. While you are here — why not make a header?
Pro tip: you can fetch this page in plain text with curl https://header.name/.