关于axios post请求参数拼接

post 拼接参数修改headers 添加 ‘Content-Type’:‘application/x-www-form-urlencoded’

axios({
method: ‘post’,
url: ‘/user’,
data: {
name:‘chenchenxuyuan’,
id:1
},
headers:{
‘Content-Type’:‘application/x-www-form-urlencoded’
}
});

你可能感兴趣的:(vue,javascript)