Definition
HTTP Header
An HTTP header is a
Name: Valueline in the metadata section of an HTTP request or response, sent between the start line and the blank line that terminates the headers. Headers carry control information rather than body content: the host being addressed, content type and length, authentication tokens, caching directives, and so on.
- Request headers describe the client and the resource it wants (
Host,User-Agent,Referer,Origin,Content-Type,Content-Length,Connection).- Response headers describe the server and the reply (
Content-Type,Content-Length,Location,Set-Cookie,Date,Connection,X-Powered-By).Headers are how the stateless parts of HTTP are customised per request; cookies, for example, ride on the
Set-Cookieresponse header and theCookierequest header.