A
A
Alexander Koregin2020-04-22 13:58:43
Vue.js
Alexander Koregin, 2020-04-22 13:58:43

How to add bearer token to axios request?

I can't find in the documentation how to correctly add the Bearer token to the request.

My code

axios.post("http://localhost/polls/public/api/logout", {
        headers: {
        Authorization: 'Bearer {token}'
      });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tigran Abrahamyan, 2020-04-22
@dragonika8

https://stackoverflow.com/questions/53705861/vuejs...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question