HttpClient Factory Core Principles Never new HttpClient() per request — Raw HttpClient creation causes socket exhaustion under load and ignores DNS changes. Use IHttpClientFactory to manage handler lifetimes. Keyed clients over typed clients — Keyed DI ( .AddAsKeyed() ) is the recommended pattern in .NET 10. Typed clients captured in singletons silently break handler rotation. Resilience is not optional — Every external HTTP call needs retry, circuit breaker, and timeout. AddStandardResilienceHandler() provides sensible defaults in one line. DelegatingHandlers for cross-cutting concerns — Auth tokens, correlation IDs, and logging belong in the handler pipeline, not scattered across service methods. Patterns Named Client with Resilience Show more Installs 1.1K Repository codewithmukesh/…aude-kit GitHub Stars 703 First Seen Mar 13, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass
httpclient-factory
安装
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill httpclient-factory