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.
});