Last active
July 18, 2017 04:41
-
-
Save asakusuma/ee0df442c57e183aac7394c25468af99 to your computer and use it in GitHub Desktop.
Repro streaming response issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in your console | |
var stream = new ReadableStream({ | |
start(controller) { | |
setTimeout(function() { | |
controller.enqueue('test'); | |
controller.close(); | |
}, 0); | |
} | |
}); | |
var res = new Response(stream); | |
res.text().then(console.log); | |
// Causes: Uncaught (in promise) TypeError: Failed to fetch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment