cck-httpclient-factory
CommunityReliable HttpClient patterns for .NET 10
Software Engineering#resilience#httpclient#dotnet-10#ihttpclientfactory#delegatinghandler#socketshttphandler
Authors205109
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Misuse of HttpClient in .NET causes socket exhaustion, stale DNS resolution, inconsistent handler rotation, and brittle external calls without retries, timeouts, or circuit breaking; this Skill provides patterns to manage HttpClient lifetimes and add resilience consistently.
Core Features & Use Cases
- Managed HttpClient lifetimes: Use IHttpClientFactory, keyed clients, and AddAsKeyed to avoid socket exhaustion and ensure handler rotation.
- Resilience and policies: AddStandardResilienceHandler to provide timeouts, retries with jitter, circuit breaking, and rate limiting for robust external calls.
- Cross-cutting concerns via handlers: Use DelegatingHandler implementations for authentication injection, correlation ID propagation, and per-request header handling.
- Advanced tuning and testing: Configure SocketsHttpHandler for pooling and max connections and use mock HttpMessageHandler patterns for deterministic integration tests.
- Use Case: Build a production-ready API client to call third-party services with automatic retries, circuit breakers, idempotency safeguards, and testable behavior.
Quick Start
Configure a keyed HttpClient with AddAsKeyed and AddStandardResilienceHandler and add a DelegatingHandler for authentication to call your external API safely.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: cck-httpclient-factory Download link: https://github.com/s205109/AHKFlowApp/archive/main.zip#cck-httpclient-factory Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.