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

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.
主站蜘蛛池模板: 临颍县| 嵊泗县| 潜江市| 桂林市| 连南| 苗栗县| 霍林郭勒市| 政和县| 漳州市| 永和县| 额尔古纳市| 札达县| 凤冈县| 扎鲁特旗| 莫力| 南江县| 巴东县| 乌苏市| 梧州市| 万全县| 天门市| 疏附县| 德阳市| 和林格尔县| 叶城县| 平遥县| 郧西县| 开原市| 黎城县| 大余县| 奉节县| 商洛市| 阜平县| 四平市| 合山市| 会泽县| 桓仁| 秀山| 磴口县| 罗城| 咸宁市|