HTTP headers are used by clients and servers to pass additional information to each other. 

When the client exchanges information with the server, there is a need to explicitly specify the format of this data as well. HTTP headers are used to specify this meta information. HTTP headers are broadly classified into the following four categories:

  • General headers
  • Request headers
  • Response headers
  • Entity headers

Here, we are more focused on understanding request headers.

  • Headers that are sent by the client (browser) to the server are known as ‘request headers’.
  • These headers provide the server with more information about the client (the version of software the client is using, the encoding type of response data that the client can accept, etc.), and the resource that the client is trying to request.

Following are some important HTTP headers: 

  • Authorization
  • Origin
  • Content-type
  • Cache-Control

To know more HTTP headers – HTTP | MDN (mozilla.org)