HTTP Headers
Headers are metadata for requests and responses.
Request vs response headers
Request headers describe what you're sending (Content-Type, Authorization). Response headers describe what the server returns (Cache-Control, CORS). Some headers appear in both (Content-Type).
| Header | Purpose |
|---|---|
| Authorization | Credentials, Bearer tokens |
| Content-Type | Type of body (JSON, form, etc.) |
| Accept | What response format you want |
| Cache-Control | Caching behavior |