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

No HttpClient pooling #2

Open
ZOXEXIVO opened this issue Dec 24, 2021 · 0 comments
Open

No HttpClient pooling #2

ZOXEXIVO opened this issue Dec 24, 2021 · 0 comments

Comments

@ZOXEXIVO
Copy link

In generic method, that process all requests i see incorrect using HttpClient

private async Task<TResponse> PerformRequest<TResponse>(
{
      using (HttpClient client = new HttpClient())
      {
           ....
      }
}

It can cause break host application, that use this API (read this)

How to solve it?

  1. Use HttpClientFactory and deprecate unsupported platforms
  2. Expose factory method and deletegate HttpClient creating on the developer side
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

No branches or pull requests

1 participant