HTTP Headers
In this lesson, we will learn about the HTTP header and its types.
We'll cover the following
What are HTTP
headers?
The client and the server can pass some additional information using HTTP
headers through a request or a response.
An HTTP
header is basically a key-value, where its key is a case-insensitive string and value is a single or array of string.
Types of HTTP
headers
These are grouped into different categories below, based on their context:
-
General headers: this is used for both request and response and there is no relation to the message data.
-
Request headers: these are client headers, sent during the
HTTP
request and they contain information about the resource to be fetched. -
Response headers: these are server headers and are part of the
HTTP
response. They give more details about the server resource context. -
Entity headers: these headers give meta-information about the content of the body of the message like
MIME
type,Content-length
, etc.
To learn more about various HTTP
headers options, please go here.
Get hands-on with 1400+ tech skills courses.