We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I add Authorization to the data-table request header?
SOLVED
In main.js, I did this:
axios.defaults.baseURL = 'http://localhost' axios.defaults.headers.common = { 'Authorization': 'Bearer', 'Accept': 'application/json' }
The text was updated successfully, but these errors were encountered:
@kahwooi I'm having the same issue.
I tried adding your solution to my main.js and it doesn't seem to be doing anything. Could you please elaborate?
Thanks!
Sorry, something went wrong.
@mjalindahl check out https://github.com/axios/axios and read it's docs, it's quite easy to use. (you need to install axios via npm of course)
@smartapant That doesn't help. I use axios every day, and am quite familiar with it.
Pasting the "solution" in main.js does not solve the issue. The apiUrl call still sends the request without headers to the API.
Could you explain where the actual apiUrl is being run? Is there other stuff that needs to be changed?
No branches or pull requests
How can I add Authorization to the data-table request header?
SOLVED
In main.js, I did this:
The text was updated successfully, but these errors were encountered: