Request Headers

Associated with each HTTP request is a collection of HTTP headers. These headers provide supporting information that helps the Web server fulfill the request appropriately. These headers vary widely in purpose, although they belong to one of three groups: request headers, general headers, and entity headers.

Request headers pertain specifically to the request itself. Thus, these headers cannot be used in a response and do not pertain to the content being sent. HTTP/1.1 defines 19 request headers. I will explain each of these as well as an additional request header, Cookie, that has become commonly supported and is defined separately in RFC 2109, “HTTP State Management Mechanism.”

The Accept Header

The basic purpose of the

Get HTTP Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.