Skip to content

Document guidance about when to use and not use HTTP Client Factory #11882

@rynowak

Description

@rynowak

We should improve the scenario guidance around HTTP client to help users understand the whens and whys of choosing to use the HTTP Client Factory.

I want a section of the doc that provides clear messaging around the topics raised by a question like: https://github.com/aspnet/Extensions/issues/1345 Users often feel like they want to use something like the HTTP Client Factory but also don't want to use the actual HTTP Client Factory, so they ask us to change it so they have more alternatives.

We should also include samples and guidance for using HTTP Client Factory and other Microsoft.Extensions libraries outside of ASP.NET Core. Example using Web Forms: https://github.com/glennc/httpclientfactorysample/blob/master/src/WebUI.WebForms/Global.asax.cs#L26 It's not clear to users that this is possible, and it is actually something we recommend.

Using the Microsoft.Extensions libraries outside of ASP.NET Core is a great way to start modernizing an older application, and has resonated really well with some users I have talked to about it.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions