请求报文

Accept 开头

声明可接收的响应.

  1. // 希望响应式 json 格式
  2. Accept: application/json
  3. // 支持 gzip 格式的压缩
  4. Accept-Encoding: gzip, deflate
  5. // 可以支持中/英文
  6. Accept-Language: en,zh-CN;q=0.9,zh;q=0.8

Connection: keep-alive

  1. // Accept 声明接收响应的类型
  2. Accept: application/json
  3. Accept-Encoding: gzip, deflate
  4. Accept-Language: en,zh-CN;q=0.9,zh;q=0.8
  5. //
  6. Connection: keep-alive
  7. Content-Length: 55
  8. Content-Type: application/x-www-form-urlencoded; charset=utf-8
  9. Cookie: JSESSIONID=98fd85d6-71da-4e30-b494-2f4c0dca4286; SERVERID=a1729b5697c753eff2e9f2c1da4da9ff|1581562886|1581562732
  10. Host: we.zjhzyh.com
  11. Origin: http://we.zjhzyh.com
  12. Referer: http://we.zjhzyh.com/home/healthClock
  13. User-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.36
  14. temperature: 1000
  15. health: 1
  16. remark:
  17. iscontact: 0
  18. lng:
  19. lat:

响应报文

  1. Access-Control-Allow-Credentials: true
  2. Access-Control-Allow-Origin: http://we.zjhzyh.com
  3. Connection: keep-alive
  4. Content-Type: application/json;charset=UTF-8
  5. Date: Thu, 13 Feb 2020 03:05:48 GMT
  6. EagleId: 249ed89c15815631481316427e
  7. Server: Tengine
  8. Set-Cookie: SERVERID=a1729b5697c753eff2e9f2c1da4da9ff|1581563148|1581562732;Path=/
  9. Timing-Allow-Origin: *
  10. Transfer-Encoding: chunked
  11. Vary: Origin
  12. Vary: Access-Control-Request-Method
  13. Vary: Access-Control-Request-Headers
  14. Via: cache25.l2et2[18,0], kunlun8.cn1568[40,0]
  1. Request URL: http://we.zjhzyh.com/api/health/update
  2. Request Method: POST
  3. Status Code: 200
  4. Remote Address: 36.158.216.229:80
  5. Referrer Policy: no-referrer-when-downgrade

Set-Cookie

基本机制:
响应头中有Set-Cookie: username=JasonChi,那么浏览器会在当前页面所在域名设置cookie字符串。

仅在某个 Domain 下设置:
告诉浏览器给mayibank.net这个域下设置ctoken的cookie

  1. Set-Cookie: ctoken=O5kWnZU24hNA4eJq; Domain=.mayibank.net; Path=/,