http请求的headers详解
关于http请求的headers详解:这里以HTTP1.1为例结合postman返回的信息
1、Server →nginx/1.15.8 A name for the server 这是postman的解释,这就是http的一个服务。服务是干什么的呢? 这里我就不多说了NGINX嘛!阔以上传静态文件啊 、反向代理服务器啥玩意儿的。
2、Date →Mon, xx Apr xxxx xx:xx:xx GMT postman解释是:The date and time that the message was sent 解释的很标准next one.
3、Content-Type →application/json;charset=UTF-8 postman解释是:The mime type of this content 这个应该都知道就是返回内容的MIME类型
4、Transfer-Encoding →chunked The form of encoding used to safely transfer the entity to the user,Currently defined methods are:chunked,compress,deflate,gzip,identity 实体传输给用户的编码格式,有这五种 分块、压缩 等等,
Content-Encoding 和 Transfer-Encoding 二者经常会结合来用,其实就是针对 Transfer-Encoding 的分块再进行 Content-Encoding压缩。
5、Connection →keep-alive Options that are desired for the connection
6、Vary →Accept-Encoding Tells downstream proxies how to match future request headers to decide whether the cahed respose can be uesed rather than requesting a fresh one from the origin server. 告诉下游代理是使用缓存响应
还是从原始服务器请求,Accept-Encoding标头可指示代理来存储压缩和非压缩的版本资源。
7、Access-Control-Allow-Origin →* 一种解决资源跨域的策略
8、Access-Control-Allow-Methods →POST, GET, OPTIONS, DELETE,PUT
9、Access-Control-Max-Age →3600
10、X-Application-Context →application:dev:8080 Custom header
11、Access-Control-Allow-Headers →Origin,X-Requested-With, Content-Type, Accept 用于 preflight request (预检请求)中。
12、X-Forwarded-Port →443 Custom header
13、Strict-Transport-Security →max-age=15724800; includeSubDomains )是一个安全功能,它告诉浏览器只能通过HTTPS访问当前资源,而不是HTTP。
14、Content-Encoding →gzip The type of encoding used on the data.
作者:leftCoder
来源链接:https://www.cnblogs.com/panca/p/10671646.html
版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。
2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。