Web and HTTP
Debug HTTP headers
Headers often explain API failures faster than the body: content type, cache state, auth challenges, CORS, and cookies all live there.
Goal: Understand why a browser or API client handles a response differently than expected.
Workflow steps
Step 1
Copy raw headers
Use browser DevTools, cURL, or server logs. Include the status line when available.
Step 2
Parse into structured JSON
Use HTTP Headers Parser to make duplicate names, casing, and values easier to inspect.
Step 3
Check the high-signal headers
Start with content-type, cache-control, location, set-cookie, authorization challenges, and CORS headers.
Step 4
Compare client behavior
If cURL succeeds but the browser fails, inspect CORS, credentials, cookies, and mixed-content rules.
Real examples
Raw response headers
HTTP/2 200
content-type: application/json
cache-control: no-store
x-request-id: abc123CORS clue
access-control-allow-origin: https://app.example.comCommon pitfalls
Looking only at the response body.
Forgetting that header names are case-insensitive.
Sharing cookies or Authorization headers unredacted.