pace icon indicating copy to clipboard operation
pace copied to clipboard

Add a monitor for `window.fetch`

Open neon64 opened this issue 9 years ago • 8 comments

This would help the adoption of the new 'standard' to set to replace XMLHttpRequest.

The only issue is at the moment there aren't any progress events from fetch. However this should change with streams. For now I think it would be possible to copy the naive (without progress events) implementation for XMLHttpRequest.

neon64 avatar Jul 06 '16 01:07 neon64

For now, to enable pace on fetch, I have to do something like:

global.fetch = undefined;
require('whatwg-fetch');
const fetch = global.fetch;

htchaan avatar Nov 11 '16 05:11 htchaan

great library!

but, tried h0ward's method to enable fetch tracking, but doesn't work. any plan to support fetch tracking in future??

imRichardNg avatar Dec 22 '16 09:12 imRichardNg

are there any plans to support fetch? would love to see that!

tobiaszuercher avatar Jul 06 '17 08:07 tobiaszuercher

Anyone? :smiley:

dwiyatci avatar Oct 25 '19 13:10 dwiyatci

Ok. I managed to workaround it for browsers. 😁 The key is to force polyfilling fetch inwindow (global object in the web browsers) so that it falls back using XMLHttpRequest 💯

<script>window.fetch = undefined;</script>
<script src="https://unpkg.com/whatwg-fetch@latest/dist/fetch.umd.js"></script>

https://jsfiddle.net/glenn/eagtm29n/

dwiyatci avatar Oct 27 '19 21:10 dwiyatci

Shocked to see this issue is from 2016 and nothing has been done about it. :(

MangaD avatar Nov 18 '19 19:11 MangaD

Shocked to see this issue is from 2016 and nothing has been done about it. :(

I think the same. Just migrated all my $.ajax calls to fetch and I'm missing this feature a lot...

ajaniramon avatar Jan 14 '20 14:01 ajaniramon