On local testing server url have ssl certificate error so i have to disable ssl check. I have read many solutions on stackoverflow none of them helped. Problem is i can't make any change on server. So i want to know how to disable ssl check or is there any other api like fetch api or Retrofit for react native.?
My fetch api code as follows
fetch('https://example.com/logincheck', {
method: 'post',
headers: {
'Accept': 'application/json, text/plain,',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"username" :"usrname",
})
})
.then(response => response.json())
.then(responseobj => {
this.setState({
});
console.log("login status:",responseobj.success);
})
.catch((error) => {
console.error(error);
});