Skip to content

Provides a message handler for HttpClient which allows to enable logging of request/response related info. In comparison with Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler it allows to log request/response content.

License

Notifications You must be signed in to change notification settings

Iamcerba/HttpClient.Extensions.LoggingHttpMessageHandler

Repository files navigation

HttpClient.Extensions.LoggingHttpMessageHandler

Provides a message handler for HttpClient which allows to enable logging of request/response related info. In comparison with Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler it allows to log request/response content.

Installation

You can build from the source here, or you can install the Nuget version:

Install-Package HttpClient.Extensions.LoggingHttpMessageHandler

Usage

var messageHandler = new LoggingHttpMessageHandler(new Log4NetAdapter(typeof(HttpClient).FullName))
{
	EnableContentLogging = true
};

using (var httpClient = new HttpClient(messageHandler))
{
    // omitted for brevity
}

License

Licensed under MIT. License included.

About

Provides a message handler for HttpClient which allows to enable logging of request/response related info. In comparison with Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler it allows to log request/response content.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages