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

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.
主站蜘蛛池模板: 萨迦县| 关岭| 墨竹工卡县| 闵行区| 庐江县| 建平县| 花莲市| 吉首市| 阿尔山市| 天气| 甘孜县| 河源市| 乾安县| 萨迦县| 凌源市| 义马市| 青川县| 德清县| 永昌县| 镶黄旗| 大足县| 土默特右旗| 忻城县| 凯里市| 屯门区| 铁力市| 永泰县| 交口县| 土默特右旗| 西城区| 交城县| 类乌齐县| 运城市| 秦皇岛市| 塘沽区| 宜州市| 岗巴县| 武穴市| 株洲市| 苏尼特左旗| 太原市|