DoSomethingArchive / LetsDoThis-iOS

:iphone: iOS source code for DoSomething: Take Action on the News
http://app.dosomething.org
MIT License
2 stars 0 forks source link

Set header timeouts in React fetch requests #823

Open aaronschachter opened 8 years ago

aaronschachter commented 8 years ago

https://github.com/andris9/fetch#options

aaronschachter commented 8 years ago

Not as easy as expected. Refs https://github.com/facebook/react-native/issues/2556

jonuy commented 8 years ago

Are you coming across scenarios where the fetch doesn't timeout?

At least with the news feed on the Android side it looks like it's always around 30 seconds.

imo probably not a launch blocker, but a v2 UX fix if that feels too long.

aaronschachter commented 8 years ago

The fetch command doesn't timeout if I use the Xcode developer tools "Very bad network" connection... because I think it needs code to make the Promise cancellable (per https://github.com/DoSomething/LetsDoThis-iOS/issues/823#issuecomment-188985416)