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

HttpClient performance issue #9

Closed
TimothyMeadows opened this issue Jan 11, 2019 · 3 comments
Closed

HttpClient performance issue #9

TimothyMeadows opened this issue Jan 11, 2019 · 3 comments
Assignees

Comments

@TimothyMeadows
Copy link
Owner

TimothyMeadows commented Jan 11, 2019

It seems there may be a bug / feature in httpclient that causes performance issues affects this library.. More can be read about this here:

https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
https://byterot.blogspot.com/2016/07/singleton-httpclient-dns.html

@ErikPhilips
Copy link

ErikPhilips commented Jan 11, 2019

I'd also recommend allowing the consumer to pass their own HttpClient.

    public RecaptchaService(IOptions<RecaptchaSettings> options)
      this(options, null)
    {
    }
    public RecaptchaService(IOptions<RecaptchaSettings> options, HttpClient httpClient)
    {
      RecaptchaSettings = options.Value;
    }

@TimothyMeadows
Copy link
Owner Author

This is also a good enhancement. Thanks for both Erik.

TimothyMeadows added a commit that referenced this issue Jan 11, 2019
@TimothyMeadows
Copy link
Owner Author

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

No branches or pull requests

2 participants