Why does this code is usually caused by an invalid request error keep happening? or How to fix 'this

18 Replies, 1787 Views

Wild guess: are you using fetch() in JS? The this code is usually caused by an invalid request error can happen if you don’t stringify the body.

Example:
```fetch(url, {
method: 'POST',
body: JSON.stringify(data) // << this is easy to forget
})```

Might not be your issue, but it’s a common pitfall!

Messages In This Thread



Users browsing this thread: 1 Guest(s)