需要将以下行添加到传递的$ http对象中:
headers: {'Content-Type': 'application/x-www-form-urlenpred; charset=UTF-8'}
并且传递的数据应转换为URL编码的字符串:
> $.param({fkey: "key"})'fkey=key'
所以你有这样的事情:
$http({ method: 'POST', url: url, data: $.param({fkey: "key"}), headers: {'Content-Type': 'application/x-www-form-urlenpred; charset=UTF-8'}})
发件人:https
:
//groups.google.com/forum/#!msg/angular/5nAedJ1LyO0/4Vj_72EZcDsJ
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)