Skip to main content

HTTP

HTTP 请求头和响应头

请求头

Request Header

  • Accept - 用户代理期望的 MIME 类型列表
  • Accept-Charset - 用户代理支持的字符集
  • Accept-Encoding - 用户代理支持的压缩编码
  • Accept-Language - 用户代理期望的页面语言
  • Authorization - 包含用服务器验证用户代理的凭证

响应头

Responses Header

HTTP 报文

GET / HTTP/1.1
Host: developer.mozilla.org
Accept-Language: fr
HTTP/1.1 200 OK
Date: Sat, 09 Oct 2010 14:28:02 GMT
Server: Apache
Last-Modified: Tue, 01 Dec 2009 20:18:22 GMT
ETag: "51142bc1-7449-479b075b2891b"
Accept-Ranges: bytes
Content-Length: 29769
Content-Type: text/html

<!DOCTYPE html... (here comes the 29769 bytes of the requested web page)