Closed
Description
I am aware of the limitation that the body request can be read only a once.
here is a blog post which allows me to read it twice
The problem is this approach allows to read the body BEFORE ASP.NET Core read it
I need to read the body again AFTER ASP.NET Core read it (for Serilog)
// here is program.cs file .NET 6
app.UseSerilogRequestLogging(options =>
options.EnrichDiagnosticContext = (diagnosticContext, httpContext) =>
{
// I want to read the body here from httpContext
}
);
Can this be done? if not do you have any plan to create new API that allow the user to do that if he opt-in for it?
Thank you
Metadata
Metadata
Assignees
Labels
No labels