Skip to content

Instantly share code, notes, and snippets.

View vijayjangid's full-sized avatar
:octocat:
figuring out...

Vijay Jangid vijayjangid

:octocat:
figuring out...
View GitHub Profile
@vijayjangid
vijayjangid / fetch-chunked.js
Last active September 14, 2018 07:04 — forked from jfsiii/fetch-chunked.js
Quick example of using fetch to parse a chunked response
var chunkedUrl = 'https://jigsaw.w3.org/HTTP/ChunkedScript';
fetch(chunkedUrl)
.then(processChunkedResponse)
.then(onChunkedResponseComplete)
.catch(onChunkedResponseError)
;
function onChunkedResponseComplete(result) {
console.log('-----------all done!----------');
console.log(result);