Open DrewCerny opened 2 years ago
Any news on this one? Is there any way we can get the proposed fix merged?
This bug could be fixed with this code. Note! You should require this code after const server = new Pretender();
.
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?
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.