Skip to content

Confusing HttpClient guidelines #43598

@gabbsmo

Description

@gabbsmo

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions