您的位置:首页 > 移动开发 > IOS开发

Axios.post 和.get 请求参数 和headers配置

2020-08-26 22:14 2851 查看

.get

 axios.get("http://xxx.com/xxx/xxx/xxx?",{
params:{id:this.kemuid},
headers:{token:Cookies.get('token'), platform: 'web'}
}).then((res)=>{
console.log(res)
})

.post

axios.post("http://xxx.com/xxx/xxx/xxx?",
{
'queslistid':this.kemuid
},
{
headers: {'token':Cookies.get('token'),'platform': 'web'}
}
).then((login)=>{

console.log(login)
})
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐