表单请求的时候,HTTP中的Content-Type属性标记了Body的内容Content-Type:application/x-www-form-urlencoded 代表表单Content-Type: application/json 代表JSON数据 还有如multipart/form-data用于上传包含文件的内容,application/xml则是XML文件 至于编码方面,也会有些许的差异。可以参考这篇文章
表单请求的时候,HTTP中的
Content-Type
属性标记了Body的内容Content-Type:application/x-www-form-urlencoded 代表表单
Content-Type: application/json 代表JSON数据
还有如multipart/form-data用于上传包含文件的内容,application/xml则是XML文件
至于编码方面,也会有些许的差异。可以参考这篇文章