1. x-www-form-urlencoded
浏览器原生表单默认的提交数据的方式(就是没有设置enctype属性),POST提交数据的默认方式,将表单内的数据转换为Key-Value。请求body中按照 key1=value1&key2=value2 进行编码,key和value都要进行urlEncode,所以如果传递的参数存在中文或者特殊字符需要注意。
POST http://localhost:8087/x-www-form-urlencoded HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Fiddler
Host: localhost:8087
Content-Length: 14
//注意空行不能丢
fileName=88888
2.text/xml
text/xml和application/xml区别:
text/xml忽略xml文件头中的关于编码的设定(<?xml version=”1.0” encoding=”UTF-8”?>),默认采用us-ascii编码。
application/xml会依照xml文件头中编码的设定。