Net Core Api How To Log Requests And Responses

[Solved] Net Core Api How To Log Requests And Responses | Vb - Code Explorer | yomemimo.com
Question : .net core api how to log requests and responses

Answered by : mushy-manatee-xvsgotf9knl8

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{ // Important to have it as early as possible app.UseHttpLogging();
}
services.AddHttpLogging(options =>
{ options.LoggingFields = HttpLoggingFields.RequestPropertiesAndHeaders | HttpLoggingFields.RequestBody;
});

Source : https://josef.codes/asp-net-core-6-http-logging-log-requests-responses/ | Last Update : Tue, 30 Aug 22

Answers related to net core api how to log requests and responses

Code Explorer Popular Question For Vb