What problem does it solve?
This skill prevents production HTTP issues like socket exhaustion, brittle configuration, and unreliable outbound calls by standardizing how IHttpClientFactory-based clients are created and used.
Core Features & Use Cases
- Safe client creation: Enforces factory-managed HttpClient lifetimes to avoid per-request instantiation and DNS-related problems.
- Named/Keyed client patterns: Guides selection of named and keyed clients (including .NET 10 keyed registration) for clear configuration and correct lifetimes.
- Resilience by default: Shows how to apply Microsoft.Extensions.Http.Resilience with retries, circuit breakers, and timeouts, plus when to disable retries for unsafe methods.
- DelegatingHandler pipeline: Centralizes cross-cutting concerns such as auth token injection and correlation ID propagation so services stay clean.
- Testing-friendly HTTP: Demonstrates mock HttpMessageHandler patterns for deterministic integration and unit tests.
Quick Start
Register an IHttpClientFactory client for your external API and attach AddStandardResilienceHandler() so every outbound call gets consistent retry, timeout, and circuit breaker behavior.