简介
对于请求头部和相应头部的认识
请求头部
在http请求头部里面 含有的参数有(常用):
- Accept
- Accept-Encoding
- Accept-Language
- Cache-Control
- Connection
- Host
- Pragma
- Upgrade-Insecure-Requests
- User-Agent
- Cookie
- Content-Length
- Content-Type
- If-Match
- If-Modified-Since
- If-None-Match
- Referrer
Accept
指定客户端可以接收的内容类型
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
Accept-Encoding
指定浏览器可以支持的web服务器返回内容压缩编码类型
Accept-Encoding:gzip, deflate, br
响应头部
- Connection
- Content-Encoding
- Date
- Transfer-Encoding
- Accept-Ranges
- Age
- Cache-Control
- Content-Length
- Content-Type
- Expires
- Last-Modified
- Pragma
- Server
- X-Powered-By
- Set-Cookie
- ETag