inspect/intercept/modify any network requests
Ili estas versioj de tiu ĉi skripto, kie la kodo estas ĝisdatigita. Montri ĉiujn versiojn
Disable use of ReadableStream to track upload progress. It was flaky, even on Chrome.The simpler code path should work in every browser, at the cost of not actually tracking any upload progress.
act like you belong.
- Changed the way we emit errors in the middle of an event dispatch, to allow global event handlers to see them.- Tweaked mimeTypeOverride() to allow calling it before calling open().- Fixed upload progress events (at the cost of some synchronous timing discrepancies when sending a FormData or URLSearchParams body.)- Slightly more compliant content type/charset handling.- Use charset values properly for responseText.- Use mimeType overrides properly for 'blob' type.- Some subtle changes nobody will ever care about, but that made the WPT pass test count a tiny bit higher.
- enable recovery from network error. responseHandler now takes (request, response, error) as parameters, and can return a Response object when seeing an error to have middleman pretend the error never happened.- credentials fix, should hopefully match XHR's withCredentials flag now.
So.. grabbing `.constructor.name` on what should be a Request or a Response does not in fact guarantee you'll get a "Request" or "Response" string.It turns out a little known library, core.js, can replace those constructors with their own, with a name that typically gets minimized at build time. Great.Also, made an error message a bit more chatty.
- support for XHR.upload- expose an XMLHttpRequestEventTarget object, for those weird bits of code out there that care about it.- hardened the hook framework, so a throwing hook doesn't just completely break an entire page/app anymore.- somewhat more spec compliant in a few places. - events are more likely to fire at roughly the right time and in the right order. - the behavior of response/responseXML/responseText should be more plausible. - various errors thrown when misusing/miscalling XHR should better match expectations.
- Fixed the proxied event used by our EventTarget class, it shouldn't get as upset when interacted with anymore.- Renamed event name fields from `name` to `type`, for consistency and stuff.
- added an EventTarget polyfill (might make things work on Safari. don't know, can't test.)- "progress" events are now plausibly emitted.- abort and timeout should also work after headers are received.- fixed a bunch of other bugs.
This is what happens when you're about to publish and you go "oh wait I could just take a regex directly for the route! I can just tweak the code here right quick."