fetch("http://localhost/user/shop", {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'text/plain'
}
})
.then((response) => response.json())
.then((data) => {
console.log(data);
});
Hello, everyone. I'm getting a 403 forbidden request error from calling an API from a local backend server. The API call works in Postman flawlessly but for some reason, when I use a fetch/axios GET request in React Native to call the API, it does not work and keeps giving me that 403 error. Does anybody have a solution for this? All I'm doing is just a simple GET request that shouldn't require any authorization details or anything. Below are screenshots of the error and the Postman request: