-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
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 to replace Axios with another library? #207
Comments
Hi, unfortunately, this is very small and rather unknown library to be implemented. What I recommend to create wrapper plugin library that will handle sending requests in |
That's good to know. Is there an example of a wrapper plugin that I can use? I tried to play with the plugin factory method but could not get through. |
Unfortunately, no. You'll have to google that yourself. You can check out how I did it here: https://github.com/dgrubelic/vue-authenticate/blob/master/src/index.js#L10 any try to implement it yourself. |
I mean how to inject the $http into vue-authenticate before adding it to Vue plugins? |
In Vue2 could probably just do the following: Vue.prototype.$http = axios.create(); If you replace axios with anything else, you'll just need to make sure the function calls are compatible with the way this package uses it. |
I am using https://github.com/twg/devour to handle my JSON API requests. How to use it instead of Axios?
The text was updated successfully, but these errors were encountered: