官术网_书友最值得收藏!

The request header

Here is an HTTP request captured using a web application proxy when browsing to www.bing.com:

The first line in this header indicates the method of the request: GET, the resource requested: / (that is, the root directory) and the protocol version: HTTP 1.1. There are several other fields that can be in an HTTP header. We will discuss the most relevant fields:

  • Host: This specifies the host and port number of the resource being requested. A web server may contain more than one site, or it may contain technologies such as shared hosting or load balancing. This parameter is used to distinguish between different sites/applications served by the same infrastructure.
  • User-Agent: This field is used by the server to identify the type of client (that is, web browser) which will receive the information. It is useful for developers in that the response can be adapted according to the user's configuration, as not all features in the HTTP protocol and in web development languages will be compatible with all browsers.
  • Cookie: Cookies are temporary values exchanged between the client and server and used, among other reasons, to keep session information.
  • Content-Type: This indicates to the server the media type contained within the request's body.
  • Authorization: HTTP allows for per-request client authentication through this parameter. There are multiple modes of authenticating, with the most common being Basic, Digest, NTLM, and Bearer.
主站蜘蛛池模板: 读书| 堆龙德庆县| 汶川县| 宣威市| 克拉玛依市| 交城县| 五大连池市| 五大连池市| 武平县| 依安县| 得荣县| 绵竹市| 沁水县| 巩留县| 桃园市| 平谷区| 繁昌县| 西乌珠穆沁旗| 若尔盖县| 乌鲁木齐县| 桦南县| 石泉县| 平谷区| 乳山市| 崇阳县| 岳西县| 湖北省| 武城县| 丰顺县| 阿城市| 友谊县| 孟连| 扶绥县| 保定市| 合阳县| 隆回县| 连南| 海门市| 华宁县| 剑川县| 文水县|