fetch
fetch copied to clipboard
fetch response body as ReadableStream
Hello there, from what I can gather from mdn the fetch specification defines the return value to resolve to a response object that has a body property that is a "ReadableStream". This means that we can get the response "bit by bit" as soon as it arrives instead of waiting for the whole request to finish. This fetch implementation only resolves to a response after the "load" event has been fired on the XHR object, which only happens once the whole body is received.
It looks to me like this part of the specification is missing, was it intentionally left out because it's too complex or what are the reasons behind that? I'm trying to implement an EventSource listener in react-native which uses this library as a fetch polyfill.
hi, Can i work on this?
@ritikBhandari yes you can 👍
It seems they will not add the property . https://github.com/github/fetch/issues/198#issuecomment-494361060
Closing as a duplicate of https://github.com/github/fetch/issues/746