IHttpClientFactory
IHttpClientFactory is a .NET dependency-injection abstraction for creating configured HttpClient instances while managing their underlying handlers.
ASP.NET Core in Action, 3e
IHttpClientFactory is the .NET dependency-injection service for creating configured HttpClient instances and managing their underlying handlers.
- How it is used
- Uses the factory to create configured HTTP clients for remote APIs while managing their handlers.
- How deep it goes
- Explains handler pooling and request pipelines, then gives registration steps for clients, custom handlers, and retry policies.
- Examples
- Uses an exchange-rate endpoint and an API-key handler to demonstrate client creation and outgoing request customization.
- What you can do after
- Apply it via IHttpClientFactory to configure clients, add handlers, and select transient-error retry policies.
Read how ASP.NET Core in Action, 3e explains IHttpClientFactory →
.NET MAUI in Action
IHttpClientFactory is a .NET dependency-injection service for creating configured HttpClient instances and managing their underlying handlers.
- How it is used
- Configures and resolves purpose-specific HttpClient instances through .NET dependency injection.
- How deep it goes
- Explains registration, naming, handler chaining, and resolution, but does not detail HttpClient internals.
- Examples
- Uses AuthHandler, AUTHENTICATED_CLIENT, AddApiClientServices, and BaseService as concrete configuration and consumption examples.
- What you can do after
- Operate/configure named HttpClient instances and attach reusable handlers for authenticated requests.
Related concepts
- HTTP clientproduces · An HTTP client is software that constructs and sends HTTP requests and receives and processes the corresponding responses.
- HttpClientHandlerconfigures · HttpClientHandler is the .NET HttpMessageHandler that establishes network connections and sends HTTP requests for HttpClient.
- named clientused by · A named client is an IHttpClientFactory configuration identified by a string name and used to create consistently configured HttpClient instances.
- pipelineuses · A pipeline is an ordered sequence of connected processing stages through which data or work flows, with each stage passing or transforming its output for subsequent stages.
- socket exhaustionaddresses · Socket exhaustion is a condition in which excessive undisposed or unavailable network sockets prevent an application from establishing further connections.
Questions about IHttpClientFactory
What is IHttpClientFactory?
IHttpClientFactory is a .NET dependency-injection abstraction for creating configured HttpClient instances while managing their underlying handlers.
Which Manning books explain IHttpClientFactory?
ASP.NET Core in Action, 3e and .NET MAUI in Action.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

