GET /02_WEB_HTTP/index.html?username=admin&password=123123 HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */*
Referer: http://localhost:8080/02_WEB_HTTP/form.html
Accept-Language: zh-CN,en-US;q=0.7,ko-KR;q=0.3
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
Accept-Encoding: gzip, deflate
Host: localhost:8080
Connection: Keep-Alive
get請求報文的格式:
請求首行
GET /02_WEB_HTTP/index.html?username=admin&password=123123 HTTP/1.1
請求方式 資源路徑?查詢字符串 協議名/版本
請求頭
> 通過觀察發現請求頭實際就是一組一組的鍵值對結構,有的是一個鍵對應一個值,有的是一個鍵對應多個值
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */*
瀏覽器能夠接收的數據的格式:這裏面設置的都是MIME值,*/*表明任意文件
Referer: http://localhost:8080/02_WEB_HTTP/form.html
請求的來源:
做用:
1.廣告計費
2.網站的防盜鏈
Accept-Language: zh-CN,en-US;q=0.7,ko-KR;q=0.3
運行的語言:zh-CN表明中文,主要用來作國際化
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
用戶的系統信息:
Accept-Encoding: gzip, deflate
支持的壓縮編碼:
Host: localhost:8080
主機地址:
Connection: Keep-Alive
鏈接時間:Keep-Alive表示是一個長鏈接,時間大概是2分鐘
GET請求沒有請求體
除了表單的method屬性設置爲post時,其他的全都是get請求。
轉載請註明出處!html
http://www.cnblogs.com/libingbin/瀏覽器
感謝您的閱讀。若是文章對您有用,那麼請輕輕點個贊,以資鼓勵。app