1. 请求头
请求头 | 描述 | 示例 |
Accept | 客户端支持的数据类型 | Accept: text/html,application/xhtml+xml,application/xml;q=0.9 |
Accept-Encoding | 客户机支持的压缩方法 | Accept-Encoding: br, gzip, deflate |
Accept-Language | 客户机期望的语言 | Accept-Language: zh-CN,zh;q=0.9 |
Cache-Control | 缓存机制 | Cache-Control: max-age=0 |
Connection | 是否持久连接 | Connection: keep-alive |
Cookie | HTTP cookies | 服务器通过Set-Cookie存储到客户端的 Cookie |
Host | 连接的目标主机和端口号 | Host: 127.0.0.1:8080 |
Referer | 告诉服务器我来自于哪里 | |
If-Match | 请求指定标识符资源 | If-Match: "56a88df57772gt555gr5469a32ee75d65dcwq989" |
If-Modified-Since | 资源的缓存时间 | If-Modified-Since: Wed, 19 Oct 2020 17:32:00 GMT |
If-None-Match | 请求非指定标识符资源 | If-None-Match: "56a88df57772gt555gr5469a32ee75d65dcwq989" |
User-Agent | 产生请求的浏览器类型 | User-Agent:Safari/537.36 |
2. 响应头
响应头 | 描述 | 示例 |
Allow | 服务器支持哪些请求方法 | Allow: POST,GET,OPTIONS |
Cache-Control | 缓存机制 | Cache-Control: public, max-age=3600 |
Connection | 是否持久连接 | Connection: keep-alive |
Content-Encoding | 内容编码方式 | Content-Encoding: br |
Content-Type | 内容的MIME类型 | Content-Type: text/html; charset=UTF-8 |
Date | 报文创建时间 | Date: Sun, 28 Feb 2021 11:52:51 GMT |
Expires | 资源过期时间 | Expires: Sun, 28 Feb 2021 12:52:51 GMT |
ETag | 资源标识符 | ETag: "56a88df57772gt555gr5469a32ee75d65dcwq989" |
Last-Modified | 服务端对该资源最后修改的时间 | Tue, 11 Jul 2000 18:23:51 GMT |
Set-Cookie | 服务端向客户端发送Cookie | Set-Cookie: token=6e204d9b-103a-431e-b8de-ba97b2d1; path=/; HttpOnly |