一.因 URL 意外地以“XXX”结束,请求格式无法识别
该问题的解决方法如下:在web.config的system.web中,添加如下代码:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
二.post请求返回数据包含d:null
一般情况下默认header:
header: {'content-type': 'application/json'},//默认值
修改后:
header: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},