70283902

Date: 2021-12-09 02:10:44
Score: 7.5 🚩
Natty:
Report link

I'm getting a 403 forbidden request error as well, but for a GET request. Works without a problem in Postman the same way. The following is my code:

fetch("http://localhost/user/shop", {
  method: 'GET',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'text/plain'
  }
})
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  });

Does anyone know how to solve this problem? You may also answer this in my thread here: React Native fetch/axios GET request 403 error but works in Postman

Reasons:
  • Blacklisted phrase (1): how to solve
  • RegEx Blacklisted phrase (2): Does anyone know
  • RegEx Blacklisted phrase (1.5): how to solve this problem?
  • Has code block (-0.5):
  • Me too answer (2): this problem
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Stanley Yeung