The request header indicates the action the client wants to perform on the target web server. It also contains information about accepted compression methods, the type of client accessing the server, and any cookies that the server has instructed the client to present. The details of the HTTP request headers are explained here:
Header |
Explanation |
GET /search… HTTP/1.1 |
GET is the verb used to access the application, as detailed in the section on HTTP verbs. The request also includes the path, query parameters, and the HTTP version. |
Host: google.com |
This header specifies the target service we wish to use. A server may host multiple services, as discussed in the section on VHOSTS. |
User-Agent |
A client application, typically a browser, can identify itself by providing information about its version, rendering engine, and operating system. |
Accept |
Specifies the types of content that the client is willing to accept. |
Referer: https://code7school/ |
If the client clicks a link from another website, the |
Accept-Encoding: gzip, deflate |
This specifies whether the content can be compressed or encoded, indicating the formats we are willing to accept. |
Cookie |
Cookies are values sent by the server in earlier requests, which the client includes in every subsequent request. This is explained in more detail in the section on State. |