Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to pass a HttpMessageHandler to the HttpClient #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mwinkler
Copy link

@mwinkler mwinkler commented Sep 5, 2022

This change allow to optionally pass a HttpMessageHandler to the used HttpClient inside the logger.
Example:

var config = builder.Configuration.GetSection("Splunk").Get<SplunkLoggerConfiguration>();
var handler = new HttpClientHandler
{
     Proxy = new WebProxy("http://localhost:8080")
};
builder.Logging.AddProvider(new SplunkHECJsonLoggerProvider(config, null, handler));

To control, how the http client behaves and allows different use cases like adding a proxy, config ssl validation, ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant