When I create a brand new project using react-native init (RN version 0.52-RC) and put a fetch in the render method to the public API, it throws a Network Request Failed. There is a very useless stack trace and I can't debug network requests in the chrome console. Here is the fetch I'm sending:
 fetch('https://test.online/login', {
            method: 'POST',
            headers: {
                'Accept': 'application/json',
                'Content-Type': 'application/json',
            },
            body: JSON.stringify({
                email: this.emailId,
                password: this.password
            })
        }).then((data) => {
            return data.json();
        }).then((data) => {
        }).catch((err) => {
            alert(err); // TypeError:Network request faild.
        });
                if you are using nginx server then change
from ssl_ecdh_curve secp384r1 to ssl_ecdh_curve prime256v1 
in this /etc/nginx/snippets/ssl-params.conf file
see detail to check here https://community.letsencrypt.org/t/warning-android-7-0-clients-not-browsers-can-only-use-curve-prime256v1/23212
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With