The behavior of the HttpClient.PostAsync method is to get rid of the provided HttpContent .
There are many ways to get around this behavior, including creating a new HttpContent for each call made on the client, or loading content into a stream and changing the pointer.
I wonder why calling this method automatically causes its IDisposable parameters to be deleted? As far as I know, this is not the usual behavior in .NET.
It is also worth noting that this behavior is also observed in PUT requests that are idempotent, so the premise that this behavior prevents sending information again does not seem to be correct.
source share