I have a PHP file. When I send category:'true' with the POST method in HTML JS, it gives me back text which I echo in PHP but with React Native it sends me an object instead. How can I solve this?
This is my code:
return fetch('http://709957ef.ngrok.io/follower/get%20json.php',{
method:'POST',
body:JSON.stringfy({
category:'true'
})
})
.then((response) => response.text())
.then((responsetxt) => {
alert(responsetxt)
})
.catch((error) => {
console.error(error);
});
}
responsetxtis an object?