Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Missing information
https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory
The code examples in this article dispose the HttpClient returned from httpClientFactory.CreateClient(), and it says
httpClientFactory.CreateClient()
Disposing of such HttpClient instances created by the factory will not lead to socket exhaustion...
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-9.0&preserve-view=true#httpclient-and-lifetime-management
The code example in this article not dispose the HttpClient returned from httpClientFactory.CreateClient(), and it says
HttpClient instances can generally be treated as .NET objects not requiring disposal...
https://learn.microsoft.com/en-us/dotnet/api/system.net.http.ihttpclientfactory.createclient?view=net-9.0-pp#remarks
The remark says
It is generally not necessary to dispose of the HttpClient as the IHttpClientFactory tracks and disposes resources used by the HttpClient
So shall we dispose the HttpClient returned by httpClientFactory.CreateClient()?
HttpClient
https://github.com/dotnet/docs/blob/main/docs/core/extensions/httpclient-factory.md
33db41be-42f9-bb94-65fe-0cf7d1c64f12
c667850f-a5ec-d80b-d8af-0c1c1e37e599
@IEvangelist
Related Issues
Associated WorkItem - 429408
The text was updated successfully, but these errors were encountered:
IEvangelist
Successfully merging a pull request may close this issue.
Type of issue
Missing information
Description
https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory
The code examples in this article dispose the HttpClient returned from
httpClientFactory.CreateClient()
, and it sayshttps://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-9.0&preserve-view=true#httpclient-and-lifetime-management
The code example in this article not dispose the HttpClient returned from
httpClientFactory.CreateClient()
, and it sayshttps://learn.microsoft.com/en-us/dotnet/api/system.net.http.ihttpclientfactory.createclient?view=net-9.0-pp#remarks
The remark says
So shall we dispose the
HttpClient
returned byhttpClientFactory.CreateClient()
?Page URL
https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-factory
Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/extensions/httpclient-factory.md
Document Version Independent Id
33db41be-42f9-bb94-65fe-0cf7d1c64f12
Platform Id
c667850f-a5ec-d80b-d8af-0c1c1e37e599
Article author
@IEvangelist
Metadata
Related Issues
Associated WorkItem - 429408
The text was updated successfully, but these errors were encountered: