Skip to content
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

It's possible to use 2 instances? #111

Closed
amandiobm opened this issue Sep 23, 2021 · 1 comment
Closed

It's possible to use 2 instances? #111

amandiobm opened this issue Sep 23, 2021 · 1 comment

Comments

@amandiobm
Copy link

Hey all,

Was reading through old issues and I found these:

Both are closed but none of those methods works as suggested.

There is a way to have 2 instances of this?

Thanks.

@imcvampire
Copy link
Owner

imcvampire commented Sep 23, 2021

Have you tried this code? It may not work with Typescript.

let firstInstance = axios.create()
let secondInstance = axios.create()

Vue.use(VueAxios, {
  first: firstInstance,
  second: secondInstance
})

// available Vue.$http.first and Vue.$http.second

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants