angularjs请求服务器报405,数据格式不对,以x-www-form-urlencoded传输
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
transformRequest: function(obj) {
var str = [];
for(var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURI
原创
2016-10-12 17:44:16 ·
4400 阅读 ·
1 评论