HTTP Header

Domain: Internet & Web

🎯 Motivation

Metadata sent with HTTP requests and responses: content type, authentication, caching, CORS.

📋 Concrete Example

Headers: ‘Content-Type: application/json’ (data is JSON). ‘Authorization: Bearer token123’ (authenticated). ‘Access-Control-Allow-Origin: *’ (CORS: any website can access). Metadata about the request.

🔗 Analogy

HTTP headers are like labels on a package - Fragile (handle carefully), Refrigerate (storage instruction), ‘Return Address’ (sender). Headers give the server instructions about how to handle the request.