3
I need to pass the header Authorization
which is located in the localStorage
with the key to iflix-user-token
, here is my code:
getFilmes: function () {
this.$http.get(Api.url + '/filme').then(
response => {
this.filmes = response.body
}
)
}
I’m using the vue-resource
.
I searched there even before researching here, but I did not succeed. However, I put Authorization without quotation marks, I will try now and return. Anyway; Thank you very much.
– Márcio Lucas
@Márciolucas in this case the quotes do not make a difference. Are you sure that is the name of the header you have to send?
– Sergio
Yes, absolutely. Really, it didn’t work...
– Márcio Lucas
@Márciolucas where you read that you need to pass this header?
– Sergio
Brother, I managed to find the bug. I passed the header. Solved. Thank you!
– Márcio Lucas
@Márciolucas great! If the answer helped you can click to mark as accepted.
– Sergio
I really wanted to, but since I’m new here my acceptance is not counted.
– Márcio Lucas
@Márciolucas accept does not depend on the vote. You can take a look here: https://pt.meta.stackoverflow.com/q/1078/129
– Sergio