-
Notifications
You must be signed in to change notification settings - Fork 247
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
Fix passthrough support with axios 1.2 #363
Fix passthrough support with axios 1.2 #363
Conversation
2b40430
to
04b3de6
Compare
argh. the baseURL somehow changes from one version to another. |
If I understand it correctly your fix is to call the (unmocked) axios API (with the current request configuration, and without any transformations) when a passthrough is to be performed. Are there any ramifications? I still hope for a positive reaction from the axios maintainers regarding a proposal for making the default adapter available. |
You're right, the interceptors are probably called twice. We could clone the instance during instantiation. Then interceptors won't get copied. I think everything else config-based is only handled by the adapter. |
I've extended the tests with a counter for the request and response interceptors. |
@ctimmerm This pr fixes compatibility with axios 1. would you like to review that? |
hello @ctimmerm , can this fix be merged? :) |
@ctimmerm feel free to add me as maintainer here and on npm if you don't have the time to maintain this module. |
I got access to github & npm and released that change as v1.21.3. |
thanks so much! this fix allows me to upgrade axios now. Very appreciated |
Fixes #357