tofacebook.com -专业IT技术社区 【百家号】脸书百科,HTTP请求格式和HTTP响应格式 Web程序 - tofacebook.com-专业IT技术社区
82°

【百家号】脸书百科,HTTP请求格式和HTTP响应格式 Web程序

标签:ups   lang   www.   windows   user   request   uri   requests   header   

HTTP请求格式
" GET {} HTTP/1.1\r\nhost: {}\r\nConnection\r\n\r\n".format(path, host)
 

 

技术分享图片
 
Request Header
GET / HTTP/1.1
Host: www.baidu.com
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: pgv_pvi=7145755648; BAIDUID=28DEC113C666529BA3CDA3D7B9BB371F:FG=1; BIDUPSID=28DEC113C666529BA3CDA3D7B9BB371F; PSTM=1531802555; BD_UPN=12314353; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598
 
 
 
 
HTTP响应格式
 
技术分享图片
 
HTTP响应格式

HTTP/1.1 200 OK
Bdpagetype: 1
Bdqid: 0xe23fd0420000b189
Cache-Control: private
Connection: Keep-Alive
Content-Encoding: gzip
Content-Type: text/html
Cxy_all: baidu+1302051616dc8b2d14e6f36b4bbd9140
Date: Wed, 25 Jul 2018 05:08:29 GMT
Expires: Wed, 25 Jul 2018 05:07:40 GMT
Server: BWS/1.1
Set-Cookie: BDSVRTM=0; path=/
Set-Cookie: BD_HOME=0; path=/
Set-Cookie: H_PS_PSSID=1423_21116_18559_26350_22159; path=/; domain=.baidu.com
Strict-Transport-Security: max-age=172800
Vary: Accept-Encoding
X-Ua-Compatible: IE=Edge,chrome=1
Transfer-Encoding: chunked

 
 

HTTP请求格式和HTTP响应格式

标签:ups   lang   www.   windows   user   request   uri   requests   header   

原文地址:https://www.cnblogs.com/TIME-FLY/p/9365423.html


本文由百家号/熊掌号作者上传并发布,百家号仅提供信息发布平台。文章仅代表作者个人观点,不代表百度立场。

已有 0 条评论

    我有话说: