✅ Endpoint returns 400 when I add authorization code, works correctly without
Here is the authorization code:
9 Replies
Here is the failing controller:
The request I am giving to the controller:
Error:
Expected response is 204 No Content and the user getting updated
Did you debug the authorization code ahead of the json deserializer?
yes, it works
You consumed the stream, so the controller has an empty body to read
Oh, indeed!
thanks, but how do i write the stream back? or do i have to use a different method of retrieving the body?
You need to use requestbuffering
Jeremy Caney
.NET Blog
Re-reading ASP.Net Core request bodies with EnableBuffering() - .NE...
This post describes the EnableBuffering() extension method which enable re-reading of ASP.NET Core request body.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.