POST requests are failing using the @aurelia/fetch-client@2.0.0-beta.23. The response returns with a “Request body contains invalid JSON” message. Inspecting the request in Fiddler shows the body as [object Object]
The exact same request succeeds if I use native fetch. Using the json helper instead of JSON.stringify doesn’t seem to help. I’m using the fetch-client to take advantage of the async interceptor feature.
It seems to make no difference if I send pass just the payload or an object with a body property and the key is the plain object. or serialised using JSON.stringify or the json() helper function.
I’m confident it follows the docs (although intellisense tells me different)
we have test with json, and json is actually just a JSON.stringify with an if for undefined body, i’m not sure why it would have this error. This probably will require some repro on stackblitz if anyone else ever runs into this same issue. Thanks @davidsk