HTTP Header

API Testing

// Definition

A key-value metadata field attached to an HTTP request or response, transmitted before the body. Request headers describe the client and request context (User-Agent, Accept, Content-Type, Authorization, Cookie); response headers describe the server's response and instruct the client (Content-Type, Set-Cookie, Cache-Control, CORS access-control headers, security headers). Header names are case-insensitive. QA testing checklist: assert Content-Type matches the body format; verify security headers are present on responses (HSTS, CSP, X-Frame-Options, X-Content-Type-Options); confirm sensitive request headers (Authorization, Cookie) are not logged or exposed in error responses; verify CORS headers permit only expected origins.

// Related terms