Reliable.HttpClient
1.3.0
dotnet add package Reliable.HttpClient --version 1.3.0
NuGet\Install-Package Reliable.HttpClient -Version 1.3.0
<PackageReference Include="Reliable.HttpClient" Version="1.3.0" />
<PackageVersion Include="Reliable.HttpClient" Version="1.3.0" />
<PackageReference Include="Reliable.HttpClient" />
paket add Reliable.HttpClient --version 1.3.0
#r "nuget: Reliable.HttpClient, 1.3.0"
#:package Reliable.HttpClient@1.3.0
#addin nuget:?package=Reliable.HttpClient&version=1.3.0
#tool nuget:?package=Reliable.HttpClient&version=1.3.0
Reliable.HttpClient
Core Package
Caching Extension
Project Status
A comprehensive resilience and caching ecosystem for HttpClient with built-in retry policies, circuit breakers, and intelligent response caching. Based on Polly but with zero configuration required.
🎯 Choose Your Approach
Not sure which approach to use? → Read our Choosing Guide
| Your Use Case | Recommended Approach | Documentation |
|---|---|---|
| Single API with 1-2 entity types | Generic Caching | Getting Started |
| REST API with 5+ entity types | Universal Handlers | Choosing Guide |
| Need HttpClient substitution | IHttpClientAdapter | Substitution Guide |
| Custom serialization/error handling | Custom Response Handler | Advanced Usage |
Packages
| Package | Purpose | Version |
|---|---|---|
| Reliable.HttpClient | Core resilience (retry + circuit breaker) | dotnet add package Reliable.HttpClient |
| Reliable.HttpClient.Caching | HTTP response caching extension | dotnet add package Reliable.HttpClient.Caching |
Why Choose This Ecosystem?
- Zero Configuration: Works out of the box with sensible defaults
- Complete Solution: Resilience + Caching in one ecosystem
- Lightweight: Minimal overhead, maximum reliability
- Production Ready: Used by companies in production environments
- Easy Integration: One line of code to add resilience, two lines for caching
- Secure: SHA256-based cache keys prevent collisions and attacks
- Flexible: Use core resilience alone or add caching as needed
Quick Start
dotnet add package Reliable.HttpClient
// Add to your Program.cs
builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new Uri("https://api.example.com"))
.AddResilience(); // That's it! ✨
// Use anywhere
public class ApiClient(HttpClient client)
{
public async Task<Data> GetDataAsync() =>
await client.GetFromJsonAsync<Data>("/endpoint");
}
// Need custom headers? Use the adapter pattern:
public class AuthApiClient(IHttpClientAdapter client, ITokenProvider tokens)
{
public async Task<Data> GetDataAsync(string userId)
{
var headers = new Dictionary<string, string>
{
{ "Authorization", $"Bearer {await tokens.GetTokenAsync(userId)}" }
};
return await client.GetAsync<Data>("/endpoint", headers);
}
}
You now have: Automatic retries + Circuit breaker + Smart error handling
🚀 Need details? See Getting Started Guide for step-by-step setup 🆕 Building REST APIs? Check Universal Response Handlers 🔄 Need substitution patterns? See HttpClient Substitution Guide
Key Features
- Zero Configuration – Works out of the box
- Resilience – Retry + Circuit breaker
- Caching – Intelligent HTTP response caching
- Custom Headers – Default and per-request header support
- OAuth/Auth Support – Dynamic token handling per request
- Universal Handlers – Non-generic response handling for REST APIs
- HttpClient Substitution – Switch between cached/non-cached implementations
- Production Ready – Used by companies in production
📖 Full Feature List: Documentation
Need Customization?
// Custom settings
.AddResilience(options => options.Retry.MaxRetries = 5);
// Ready-made presets
.AddResilience(HttpClientPresets.SlowExternalApi());
📖 Full Configuration: Configuration Guide
Trusted By
Organizations using Reliable.HttpClient in production:
Documentation
- Getting Started Guide - Step-by-step setup
- Choosing Your Approach - Which pattern fits your use case
- Common Scenarios - Real-world examples
- Configuration Reference - Complete options
- Advanced Usage - Advanced patterns
- HTTP Caching Guide - Caching documentation
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Http.Polly (>= 9.0.8)
- Polly (>= 8.6.3)
-
net8.0
- Microsoft.Extensions.Http.Polly (>= 9.0.8)
- Polly (>= 8.6.3)
-
net9.0
- Microsoft.Extensions.Http.Polly (>= 9.0.8)
- Polly (>= 8.6.3)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Reliable.HttpClient:
| Package | Downloads |
|---|---|
|
Reliable.HttpClient.Caching
Intelligent HTTP response caching for Reliable.HttpClient with comprehensive custom headers support. Features two distinct approaches: Generic type-safe caching (CachedHttpClient<T>) for specific response types and Universal caching (HttpClientWithCache) for multi-type scenarios. Includes DefaultHeaders configuration, per-request header support, intelligent cache key generation with header isolation, preset-based configuration, automatic memory management, and zero-setup convenience methods. |
|
|
Planfact.AmoCrm.Client
Идиоматичный и типобезопасный .NET-клиент для интеграции с amoCRM API v4. |
|
|
Planfact.KodySu.Client
Идиоматичный и типобезопасный клиент для API kody.su v2.1 (поиск информации по телефонным номерам) с поддержкой отказоустойчивых соединений и кеширования. |
|
|
Planfact.Yandex.SmartCaptcha
Идиоматичный и типобезопасный .NET-клиент для Yandex SmartCaptcha с поддержкой различных типов аутентификации и встроенными resilience patterns. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.0 | 3,750 | 9/22/2025 |
| 1.2.0 | 340 | 9/18/2025 |
| 1.1.0 | 358 | 9/18/2025 |
| 1.0.0 | 1,343 | 8/29/2025 |
| 1.0.0-alpha1 | 257 | 8/29/2025 |
🎉 v1.3.0 Release - PATCH Method Support & Enhanced HTTP Operations
✨ Major New Features:
• Complete HTTP PATCH method support in IHttpClientAdapter and HttpClientAdapter
• Four PATCH method overloads: typed responses, raw HttpResponseMessage, with/without headers
• Full header support for PATCH operations including OAuth and authentication scenarios
• Comprehensive JSON serialization support for PATCH request bodies
• Modern C# 12 implementation with file-scoped namespaces and target-typed new expressions
🔧 API Enhancements:
• PatchAsync<TRequest, TResponse>(uri, request) - Typed request/response with response
handler
• PatchAsync<TRequest, TResponse>(uri, request, headers) - With custom headers support
• PatchAsync<TRequest>(uri, request) - Returns raw HttpResponseMessage
• PatchAsync<TRequest>(uri, request, headers) - Raw response with headers
• Consistent API patterns matching existing GET, POST, PUT, DELETE methods
• Full integration with existing retry policies and circuit breakers
🎯 Key Use Cases:
• RESTful API updates with partial resource modification
• JSON Merge Patch and JSON Patch operations
• Incremental data updates with authentication headers
• Resource versioning and conditional updates
• Microservice communication with PATCH semantics
🚀 Quick Start:
// Typed PATCH with response handling
var updated = await client.PatchAsync<UpdateRequest, UserResponse>("/users/123",
request);
// PATCH with custom headers
await client.PatchAsync("/api/resource", data, headers);
🔄 Previous Features (v1.2.0):
• Comprehensive custom headers support for OAuth, authentication, and API integration
• DefaultHeaders property for static headers across all requests
• Per-request headers via IHttpClientAdapter method overloads
• Fluent header management in HttpClientOptionsBuilder
• Enhanced documentation with progressive disclosure structure
📚 Full documentation: https://github.com/akrisanov/Reliable.HttpClient
⚡ Breaking Changes: None - fully backward compatible
