axios 参数为payload的解决方法
时间:2017-02-04 20:15:54
收藏:0
阅读:1549
1.加
headers: {
‘Content-Type‘: ‘application/x-www-form-urlencoded‘,
},
self.axios.post(url, {a: 1, b:2}, {
headers: {
‘Content-Type‘: ‘application/x-www-form-urlencoded‘,
},
}).then(response => response.data)
.then(data => {
console.log(data);
});
评论(0)