vue-resource拦截器设置头信息
使用vue-resource,设置头信息:Vue.http.interceptors.push((request, next) => {request.headers.set('Authorization', token)console.log(request.headers)next(response => {console.log(response.status)
·
使用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
})
})
更多推荐
已为社区贡献1条内容
所有评论(0)