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
When I initialize VuexORMAxios I do not yet have my authorization token since the user isn't logged in yet at that point.
VuexORM.use(VuexORMAxios, { database, http: { baseURL: (process.env.NODE_ENV === 'development' && !process.env.CORDOVA_PLATFORM) ? 'https://api.mydomain.dev' : 'https://api.mydomain.com', url: '/', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, }, });
Then when I try to perform a $fetch operation on one of my orm models, I get "token not provided"
If I pass the token as a get query parameter then it works but I would prefer not to do that and pass it as a header.
Can I add a header to this axios plugin after it's already been initialized?
Or else what is the best practice for including an authorization header with every axios call?
Thank you..
The text was updated successfully, but these errors were encountered:
I was able to get this to work finally by using the PR provided by @Akhail here #8
I hope this gets merged soon. In the meantime I created a patch in my project using the awesome https://github.com/ds300/patch-package
Sorry, something went wrong.
669e93a
No branches or pull requests
When I initialize VuexORMAxios I do not yet have my authorization token since the user isn't logged in yet at that point.
Then when I try to perform a $fetch operation on one of my orm models, I get "token not provided"
If I pass the token as a get query parameter then it works but I would prefer not to do that and pass it as a header.
Can I add a header to this axios plugin after it's already been initialized?
Or else what is the best practice for including an authorization header with every axios call?
Thank you..
The text was updated successfully, but these errors were encountered: