请求报文
Accept 开头
声明可接收的响应.
// 希望响应式 json 格式Accept: application/json// 支持 gzip 格式的压缩Accept-Encoding: gzip, deflate// 可以支持中/英文Accept-Language: en,zh-CN;q=0.9,zh;q=0.8
Connection: keep-alive
// Accept 声明接收响应的类型Accept: application/jsonAccept-Encoding: gzip, deflateAccept-Language: en,zh-CN;q=0.9,zh;q=0.8//Connection: keep-aliveContent-Length: 55Content-Type: application/x-www-form-urlencoded; charset=utf-8Cookie: JSESSIONID=98fd85d6-71da-4e30-b494-2f4c0dca4286; SERVERID=a1729b5697c753eff2e9f2c1da4da9ff|1581562886|1581562732Host: we.zjhzyh.comOrigin: http://we.zjhzyh.comReferer: http://we.zjhzyh.com/home/healthClockUser-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Mobile Safari/537.36temperature: 1000health: 1remark:iscontact: 0lng:lat:
响应报文
Access-Control-Allow-Credentials: trueAccess-Control-Allow-Origin: http://we.zjhzyh.comConnection: keep-aliveContent-Type: application/json;charset=UTF-8Date: Thu, 13 Feb 2020 03:05:48 GMTEagleId: 249ed89c15815631481316427eServer: TengineSet-Cookie: SERVERID=a1729b5697c753eff2e9f2c1da4da9ff|1581563148|1581562732;Path=/Timing-Allow-Origin: *Transfer-Encoding: chunkedVary: OriginVary: Access-Control-Request-MethodVary: Access-Control-Request-HeadersVia: cache25.l2et2[18,0], kunlun8.cn1568[40,0]
Request URL: http://we.zjhzyh.com/api/health/updateRequest Method: POSTStatus Code: 200Remote Address: 36.158.216.229:80Referrer Policy: no-referrer-when-downgrade
Set-Cookie
基本机制:
响应头中有Set-Cookie: username=JasonChi,那么浏览器会在当前页面所在域名设置cookie字符串。
仅在某个 Domain 下设置:
告诉浏览器给mayibank.net这个域下设置ctoken的cookie
Set-Cookie: ctoken=O5kWnZU24hNA4eJq; Domain=.mayibank.net; Path=/,
