react-native-ssl-pinning icon indicating copy to clipboard operation
react-native-ssl-pinning copied to clipboard

Is fetch API similar to Javascript fetch API

Open glrahulborah opened this issue 2 years ago • 0 comments

Hi Max,

I want to know if the fetch API same as the fetch API in Javascript in terms of implementation. For example - Is the handling of network errors the same as mentioned below?

A fetch() promise only rejects when a network error is encountered (which is usually when there's a permissions issue or similar). A fetch() promise does not reject on HTTP errors (404, etc.). Instead, a then() handler must check the Response.ok and/or Response.status properties.

Thanks, Rahul

glrahulborah avatar Sep 30 '22 06:09 glrahulborah