Answer the question
In order to leave comments, you need to log in
Adding authorization token to headers?
How to correctly implement the transfer of an authorization token in the REST API?
1) Add a token only to those requests that require authorization
2) Add a token to all requests
Answer the question
In order to leave comments, you need to log in
Using axios as an example:
If you need to add only to authorized ones, then you can write a wrapper, or create a separate instance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question