-
Notifications
You must be signed in to change notification settings - Fork 158
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
Passthrough not working with axios 0.21.2+ #354
Comments
Any news on this one? |
This bug could be fixed with this code. Note! You should require this code after const server = new Pretender();
// FIX -->
const NativeXMLHttpRequest = window.XMLHttpRequest;
window.XMLHttpRequest = function XMLHttpRequest() {
const request = new NativeXMLHttpRequest(arguments);
delete request.onloadend;
return request;
};
// <-- FIX |
Would be awesome to have this fixed! :) |
agree, some way we can push for it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Axios has made a change in version 0.21.2 that no longer adds a handler for onreadystatechange if the browser supports onloadend. Since the passthrough logic does not watch for the loadend event it does not pass it through. The result is that axios requests that should passthrough just hang.
The text was updated successfully, but these errors were encountered: