Media type of the body, optionally with a charset.
Content-Type: application/json; charset=utf-8
What to test
Assert responses declare the right type (application/json, application/problem+json for errors). Send requests with a wrong or missing Content-Type and expect 415. Error pages from proxies often come back as text/html.
Check export endpoints set attachment with a sensible filename, non-ASCII names use filename*, and user-supplied names cannot inject quotes or path separators.
Send Accept: application/xml to a JSON-only API: expect 406 or documented fallback. Versioned media types (application/vnd.example.v2+json) should select the right version.
Credentials for the request (Basic, Bearer, etc.).
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...
What to test
Test missing, malformed, expired and wrong-audience tokens (expect 401), and valid tokens lacking scope (expect 403). Make sure the header is not logged and not forwarded on cross-host redirects.
Responses with personal data or tokens must be no-store (or at least private). Public, cacheable resources should have a deliberate max-age. Check CDN behaviour matches.
Must not blindly reflect any Origin when credentials are allowed. "*" cannot be combined with credentials. Include Vary: Origin when the value depends on the request.
If the frontend reads Location, ETag or rate limit headers, they must be exposed; otherwise they appear null in the browser even though curl shows them.
Session cookies need Secure, HttpOnly and SameSite (Lax or Strict). SameSite=None requires Secure. Check Max-Age/Expires, Domain scope, and that logout clears the cookie.
Current remaining quota and reset time for a policy. IETF draft.
RateLimit: "default";r=42;t=30
What to test
Remaining (r) should decrease by one per request and the reset (t) should count down. Older drafts used separate RateLimit-Limit/-Remaining/-Reset headers.
Send a known trace id from your test and confirm it appears in the tracing backend, linking test failures to server traces. Malformed values must be ignored, not cause errors.
Retry the same request with the same key: one side effect, same response. Same key with a different body: expect 422 (or 409). Check how long keys are remembered.
Original client IP and protocol as seen by proxies.
X-Forwarded-For: 203.0.113.7, 10.0.0.2
What to test
Send a spoofed value directly and check rate limiting, IP allow-lists and audit logs do not trust it from untrusted hops.
RFC 7239 (Forwarded); X-Forwarded-For is de-facto
About this tool
Headers carry a large part of an API’s behaviour: caching rules, optimistic locking, CORS permissions, cookie security, rate limits and trace ids. This reference lists close to sixty headers that come up in API testing, each with its direction, purpose, a realistic example, what to test and the defining specification. Headers that are still IETF drafts, such as RateLimit, RateLimit-Policy and Idempotency-Key, are marked as drafts because their syntax can still change; widely used conventions without an RFC, such as X-Request-Id and X-RateLimit-*, are marked de-facto.
How to use it
Search for a header or a topic such as “cors”, “cookie” or “cache”.
Filter by direction (request or response) or category.
Copy the example line into your request, or use the “What to test” note as an assertion idea. Each header has an anchor link.
HTTP Headers Reference FAQ
Why can curl see a response header but my browser code cannot?
Cross-origin JavaScript can only read CORS-safelisted response headers unless the server lists others in Access-Control-Expose-Headers. Location, ETag and custom headers are commonly missing from it.
Which security headers should a JSON API send?
At minimum Strict-Transport-Security on HTTPS and X-Content-Type-Options: nosniff, plus Cache-Control: no-store on responses containing personal data or tokens. A restrictive Content-Security-Policy is cheap extra hardening. Avoid disclosing versions in Server and X-Powered-By.
Are header names case-sensitive?
No. HTTP header field names are case-insensitive, and HTTP/2 and HTTP/3 send them in lowercase. Write assertions that compare names case-insensitively; most clients, including Playwright’s response.headers(), normalise them to lowercase.