vue-resource拦截器设置头信息的实例
时间:2021-02-17 14:03:45|栏目:vue|点击: 次
使用vue-resource,设置头信息:
Vue.http.interceptors.push((request, next) => { request.headers.set('Authorization', token) console.log(request.headers) next(response => { console.log(response.status) return response }) })
栏 目:vue
本文地址:http://www.codeinn.net/misctech/64680.html