Web Fetch API

Howto download a binary as a stream using javascript?

It may look easy to do with good old XMLHttpRequest, but actually, it is not as obvious. In binary mode, the response object returned by XMLHttpRequest is always complete. Chunked responses are only possible using non-standard moz-chunked-arraybuffer transfer mode (only support by Mozilla [1]).

Fortunately, an new API comes to the rescue and replace XMLHttpRequest: Streams [2].