|
|
RichardHowells posted on June 19, 2025 17:06
I spent a fruitless evening trying to track down why my get request returned the badrequest result.
Using FastEndpoints under net 9.
Discovered that a get, with the content-type header application/json, seems to cause this problem. I conjecture that it's because gets normally have no body. I suspect the FastEndpoints code tries to deserialize an empty body as JSON. This results in a JSON parsing error; returned to the client as a bad request.
Removing the content type header fixed the problem for me.
There are currently no comments, be the first to post one!