Confusing HttpClient guidelines
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 370
Description
### Type of issue
Missing information
### Description
Under recommended use, there is different advice for .NET and .NET Framework. Both emphasises reuse of connections, e.g. by using IHttpClientFactory.
For .NET another recommended approach is by using a singleton HttpClient. But I do not understand how that approach is specific to .NET. Why is this not recommended for .NET Framework? Considering most legacy .NET Framework apps do not use the asp.net core dependency injection library, rolling your own singleton should be much more straightforward.
### Page URL
https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines#recommended-use
### Content source URL
https://github.com/dotnet/docs/blob/main/docs/fundamentals/networking/http/httpclient-guidelines.md
### Document Version Independent Id
3b1dd30f-82a8-2526-bd51-fb6401c52e81
### Article author
@gewarren
### Metadata
* ID: 1a42e9c6-2624-e047-ed1c-03ec047b538a
* Service: **dotnet-fundamentals**
[Related Issues](https://github.com/dotnet/docs/issues?q=is%3Aissue+is%3Aopen+3b1dd30f-82a8-2526-bd51-fb6401c52e81)
Contributor guide
Assessment
This issue has not been assessed yet.