首页 > 移动平台 > 详细

axios post、get 请求参数和headers配置

时间:2019-06-05 20:23:48      阅读:745      评论:0      收藏:0      [点我收藏+]

 

         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 请求参数和headers配置

原文:https://www.cnblogs.com/qdwz/p/10981660.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!