Answer the question
In order to leave comments, you need to log in
How to send headers in GET request using vue-resouce?
Here is the request itself:
this.$http.get(window.APIHost+'/phonebook/contacts', {}, {
// Заголовки
headers: {
'Authorization': 'Bearer '+this.$store.state.access_token
}
}).then(response => {
console.log(response)
if(response.ok) {
console.log('Out', response.body)
} else {
console.log('Error', response.status)
}
})
Host: 192.168.0.113:9009
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost:8080/
Origin: http://localhost:8080
Connection: keep-alive
Cache-Control: max-age=0
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question