Http数据协商

一、定义:

客户端发送给服务端请求的时候,声明拿到的数据格式以及相关的限制。服务端根据请求做出判断,返回相应的数据。

二、分类

1、请求

  Accept : 想要的的数据类型

       Accept-Encoding: 数据以什么样的编码方式来进行传输。 主要是限制服务端进行数据压缩,数据压缩的算法有gzip,deflate, br等。

      Accept-Language

  User-Agent

2、返回

  Content-Type: 对应Accept, 

  Content-Encoding,对应Accept-Encoding

  Content-Language

原文地址:https://www.cnblogs.com/linlf03/p/10549240.html