You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
github-actionsbot
changed the title
Optionally integrate HttpClient management into external DI
Optionally integrate HttpClient management into external DI (OSOE-556)
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 withIHttpClientFactory
.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 useIHttpClientFactory
too. However, the case of not using DI should remain supported.Also see dotnet/aspnetcore#28385.
Related convo in private repo:
Jira issue
The text was updated successfully, but these errors were encountered: