1.第一种:application/json:
这是最常见的 json 格式,也是非常友好的深受小伙伴喜欢的一种,如下
{“input1”:”xxx”,”input2”:”ooo”,”remember”:false}
json的数据在如下查看:
2.第二种:application/x-www-form-urlencoded:
浏览器的原生 form 表单,如果不设置enctype 属性,那么最终就会以 application/x-www-form-urlencoded 方式提交数input1=xxx&input2=ooo&remember=false
data数据在webforms中查看
3.第三种:multipart/form-data:
这一种是表单格式的,数据类型如下 —-
———WebKitFormBoundaryrGKCBY7qhFd3TrwA
Content-Disposition: form-data; name=”text”
title
———WebKitFormBoundaryrGKCBY7qhFd3TrwA
Content-Disposition: form-data; name=”file”; filename=”chrome.png”
Content-Type: image/png
PNG … content of chrome.png …
———WebKitFormBoundaryrGKCBY7qhFd3TrwA—
4.第四种:text/xml:
这种直接传的 xml 格式
<!--?xml version="1.0"?--><methodcall><methodname>examples.getStateName</methodname><params><value><i4>41</i4></value></params></methodcall>
