sindresorhus / ky

🌳 Tiny & elegant JavaScript HTTP client based on the Fetch API
MIT License
13.62k stars 363 forks source link

Version 0.32.2 broke Ky in react native #502

Closed hamdiwanis closed 1 year ago

hamdiwanis commented 1 year ago

I thought it would be helpful to create an issue in case anyone wanted to address this issue.

This PR https://github.com/sindresorhus/ky/pull/466 used .arrayBuffer() on the response to count the byte length and check if its empty which is not implemented in RN which resulted in this error:

Error: FileReader.readAsArrayBuffer is not implemented

sindresorhus commented 1 year ago

React Native is not supported. It's up to your to polyfill missing methods if you need to use it there.

hamdiwanis commented 1 year ago

Good to have this stated to be clear. Thanks anyway.

mzanini commented 10 months ago

I am experiencing the same issue. Any workaround?