lquixada / cross-fetch

Universal WHATWG Fetch API for Node, Browsers and React Native.
MIT License
1.67k stars 104 forks source link

Ponyfill `readAsArrayBuffer` for react-native #89

Closed UNIDY2002 closed 3 years ago

UNIDY2002 commented 3 years ago

It's been a long-standing problem that react-native fetch does not implement readAsArrayBuffer (which will cause fetch(...).then(r => r.arrayBuffer()) to throw an exception).

I found a workaround here, and I hope including this into cross-fetch will be beneficial.


BTW, forking and customizing this repository is basically for the convenience of my own project, and I understand that cross-fetch should only serve as a proxy for the existing libraries and should not add new features. So I will leave this pr as a draft and it is open to adjustments or rejection.

lquixada commented 3 years ago

hey @UNIDY2002 ! thanks for your PR. Unfortunately cross-fetch, as you mentioned, was created just to be a proxy to other libs that implement those features. So I'll have to close this PR. Thanks any way!