Automation · APIs
Response Headers
Cheat sheet · https://pcornel.dk/topic.php?topic=5302
Answer
Server and intermediary metadata describing representation type, caching, pagination, throttling, resource location, concurrency and correlation.
Remember
- Response header present ≠ body correct; headers and payload are separate evidence.
- Retry-After ≠ request safe to retry; method/idempotency still governs replay risk.
- ETag ≠ universal version number; comparison semantics are resource- and server-specific.
- Location header ≠ resource ready; creation or asynchronous processing may continue.
First checks
curl -sS -D - -o /dev/null <url>— response headers- Rate limit headers (X-RateLimit-*, Retry-After) — limits
- Request ID header — support/tracing
Verify in this order
response headers → client behaviour
Where it usually breaks
Response headers describe the response and follow-up contract; they do not independently prove payload correctness or target completion.
Response Headers API boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Caller / request | Environment/version, identity and exact request contract are attributable | Hidden defaults, wrong endpoint/version, leaked or mismatched credentials |
| Server / response | Status, headers, structured body and request ID are interpreted together | Status-only handling, ignored error body, ambiguous async result or unsafe retry |
| State / proof | Write result is reconciled with resource read-back or acceptance test | Response success treated as final target success without verification |
| Troubleshooting | First failed boundary is preserved, changed minimally and retested | Blind retries, credential rotation, replay or payload edits before evidence is captured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5302