HTTP
Headers
Common request and response headers.
By EZ4Code Team
headermetadata
Code
GET / HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml
Accept-Language: en-US,en;q=0.9
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cache-Control: no-cache
Authorization: Bearer token123
Cookie: session=abc; theme=dark
Content-Type: application/json
Content-Length: 42Explanation
Headers carry metadata about the request or response as case-insensitive name-value pairs. Accept* headers drive content negotiation, Authorization carries credentials, and Cookie sends stored cookies. Content-Type and Content-Length describe the body, while Connection controls whether the TCP socket stays open.