http请求中的header
来源:互联网 发布:淘宝刷收藏怎么算的 编辑:程序博客网 时间:2024/05/16 07:05
近期梳理python中的urllib/urllib2/httplib等相关库的时候,发现以前对忽略了一些前端知识点,现在特地补一下。
经典的headers包含"Content-length","Content-type",和其他。结合查看Quick Reference to HTTPHeaders(http://www.cs.tut.fi/~jkorpela/http.html)获取有用的HTTP头列表以及它们的解释意义。然而一堆英文不利于快速掌握这个知识点,好吧,直接来实例,一个key一个key的了解吧。打开百度首页,F12走起,截图如下:
HOST:
Specifies theInternet host and port number of the resource being requested. Obligatory inall HTTP/1.1 requests.网络资源的主机和端口地址。
User-Agent [Request]
"Mozilla/5.0 (Windows NT 6.1; WOW64;rv:51.0) Gecko/20100101 Firefox/51.0"
Contains information about the user agent(client) originating the request。包含发起请求的用户信息,通过这个参数,浏览器可以识别客户使用的操作系统及版本、CPU 类型、浏览器及版本、浏览器渲染引擎、浏览器语言、浏览器插件等
我这里是:
Mozilla/5.0,是基于 WebKit 的浏览器
Windows NT6.1 ,对应操作系统windows 7
Accept [Request]
Specifies which Internetmedia types are acceptable for the response and to assignpreferences to them.
表示可接受返回的数据类型,任何数据。jpg/gif就表示只能接受jpg/gif类型的数据.
Accept-Language[Request]
Specifies which natural languages areacceptable for the response and to assign preferences to them. Useful forlanguage negotation. 定义页面语言.
Accept-Encoding[Request]
Specifies which data formattranformations, confusingly called content(en)codings, such as compressionmechanisms, are acceptable for the response and to assign preferences to them.
定义数据压缩格式.
Connection keep-alive表示不要立即断掉我们的请求.
- http请求中的header
- HTTP Header中的内容(请求Header、响应Header)
- HTTP 请求头 Header
- HTTP请求Header详解
- 常用的http请求header
- http请求的header body
- 客户端HTTP Header 请求实例
- HTTP Header中的ETag
- HTTP Header中的ETag
- HTTP Header中的ETag
- [http] HTTP Request Header 请求头
- SpringMVC常用注解2获取http请求中的cookie,header和ServletAPI
- HTTP header中的 Cache-control
- HTTP header中的 Cache-control
- HTTP header中的Cache-Control
- HTTP header中的 Cache-control
- HTTP header中的Cache-control
- [转]客户端HTTP请求的Header信息
- viewPager+fragment实现分页切换,跳转至别的页面改变数据,fragment没有改变
- json解析开源代码【C++】
- Gulp,grunt,seajs/require和browserify/webpack的区别?
- Ubuntu14.04编译WebRTC For Android代码 2014-07-24
- 学习设计模式-装饰模式
- http请求中的header
- MySQL key_len显示长度问题
- SVG
- ejs模板学习
- 跨域资源共享 CORS(Cross-origin resource sharing)
- Eclipse 闪退方法总结,转载只是为了收藏分享
- Android 自带TTS 使用
- 微信—什么是微信订阅号?(1)
- 雅思专家解析美国商科专业有哪些,助您成功留学