Stream reading a Response object may not be available while a progress callback is specified#1281
Stream reading a Response object may not be available while a progress callback is specified#1281Xmader wants to merge 1 commit intohuggingface:mainfrom
Conversation
|
Thanks for the PR! Very interesting. 👀 Do you have a link to some documentation which states that the response body may be undefined in that (or some other) polyfill? |
|
Hi @xenova, Thanks for the reply! Another polyfill https://github.com/developit/unfetch says it only supports a subset of the Response class, |
|
Thanks for the info 👍 And just for interest's sake, what environment are you running in that requires a fetch polyfill? |
@xenova Most React Native apps use a fetch polyfill. (Some use expo/fetch which is a native module implementation.) I am not using this library, just came across this while researching some changes to the fetch polyfill, so I figured I would answer. |
|
As of Transformers.js v4, we expose a custom |
The
bodyproperty may not be available on a Response object to do streaming, e.g., when using a fetch polyfill.