axios.post("http://xxx.com/xxx/xxx/xxx?",
{
'queslistid':this.kemuid
},
{
headers: {'token':Cookies.get('token'),'platform': 'web'}
}
).then((login)=>{
console.log(login)
})
axios.get("http://xxx.com/xxx/xxx/xxx?",{
params:{id:this.kemuid},
headers:{token:Cookies.get('token'), platform: 'web'}
}).then((res)=>{
console.log(res)
})
本文展示了使用 Axios 发起 POST 和 GET 请求的示例代码。包括如何设置请求头、参数及处理响应等内容。
403

被折叠的 条评论
为什么被折叠?



