Skip to content

Conversation

antonfirsov
Copy link
Member

@antonfirsov antonfirsov commented Apr 8, 2025

There seems to be a confusion around the reasons why we advise against HttpClientFactory when the app needs to use cookies. dotnet/dotnet-api-docs#10770 and dotnet/dotnet-api-docs#1535 imply that users often think the problem might be related to CookieContainer thread safety which is not the case.

This PR updates the notes, describing the actual reasons: cookie leaking and unexpected recycling of cookies.


Internal previews

📄 File 🔗 Preview link
docs/core/extensions/httpclient-factory.md IHttpClientFactory with .NET
docs/fundamentals/networking/http/httpclient-guidelines.md HttpClient guidelines for .NET

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@antonfirsov antonfirsov merged commit 034b6e4 into dotnet:main Apr 9, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants