You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that if a request is proxied it is done as a fetch rather than an XHR. Would it make sense just to use the RealXMLHttpRequest rather than 'http' and 'https'?
The text was updated successfully, but these errors were encountered:
Yep sounds reasonable. From memory, because we've replaced the global XMLHttpRequest, we don't have access to the real XMLHttpRequest within a handler so using fetch was a hack to send real requests instead of mock ones.
In v3 the handler will receive a context object that we can put the real XMLHttpRequest on.
If this is going into a future version then great. I worked around this by creating my own proxy that makes use of XHRMock.RealXMLHttpRequest which seems to give me access to the real one before being overridden.
I noticed that if a request is proxied it is done as a fetch rather than an XHR. Would it make sense just to use the RealXMLHttpRequest rather than 'http' and 'https'?
The text was updated successfully, but these errors were encountered: