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

Optionally integrate HttpClient management into external DI (OSOE-556) #18

Open
Piedone opened this issue Jan 31, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@Piedone
Copy link
Member

Piedone commented Jan 31, 2023

Currently, we use HttpClient with a short-lived lifetime, disposing it after use, This is not how we should use it, but with IHttpClientFactory.

However, this becomes an issue if you use ApiClient in a non-ASP.NET Core app, especially in a .NET Framework app. Nevertheless, if you use it in a scenario where a DI container is available, then let's make it possible to use IHttpClientFactory too. However, the case of not using DI should remain supported.

Also see dotnet/aspnetcore#28385.

Related convo in private repo:

image

Jira issue

@Piedone Piedone added the enhancement New feature or request label Jan 31, 2023
@github-actions github-actions bot changed the title Optionally integrate HttpClient management into external DI Optionally integrate HttpClient management into external DI (OSOE-556) Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant