TCIS.Http
1.0.9
See the version list below for details.
dotnet add package TCIS.Http --version 1.0.9
NuGet\Install-Package TCIS.Http -Version 1.0.9
<PackageReference Include="TCIS.Http" Version="1.0.9" />
<PackageVersion Include="TCIS.Http" Version="1.0.9" />
<PackageReference Include="TCIS.Http" />
paket add TCIS.Http --version 1.0.9
#r "nuget: TCIS.Http, 1.0.9"
#:package TCIS.Http@1.0.9
#addin nuget:?package=TCIS.Http&version=1.0.9
#tool nuget:?package=TCIS.Http&version=1.0.9
TCIS.Http
The core HTTP library of TCIS provides API calling mechanisms with automatic Context Propagation, Resilience (Polly v8 - Retry, Circuit Breaker, Timeout), Health Checks, and Dynamic Routing.
📦 Installation
dotnet add package TCIS.Http
🚀 Usage
1. Register HttpClient (Program.cs)
Use AddTHttpClient instead of .NET's AddHttpClient to apply standard TCIS enterprise practices:
using TCIS.Http.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Declare a standard Typed Client with Resilience Policies, Context Propagation, Latency Diagnostics, and Health Checks.
builder.Services.AddTHttpClient<IMyServiceClient, MyServiceClient>(client =>
{
client.BaseAddress = new Uri("https://api.example.com");
}, healthPath: "/health/live");
var app = builder.Build();
app.Run();
2. Resilience Configuration in appsettings.json
The library supports automatic configuration binding from IConfiguration (Options section) with the following structure:
{
"HttpResilience": {
"MaxRetries": 3,
"RetryDelayMilliseconds": 100,
"CircuitBreakerFailures": 5,
"CircuitBreakerBreakSeconds": 30,
"TimeoutSeconds": 10
}
}
3. Exceptions you must catch
With AddTResilienceHandler() (and therefore AddTHttpClient), a failed call does not always surface as
HttpRequestException / TaskCanceledException:
| Situation | Exception |
|---|---|
A single attempt exceeds TimeoutSeconds |
Polly.Timeout.TimeoutRejectedException |
| The circuit is open | Polly.CircuitBreaker.BrokenCircuitException |
| Transport failure after the last retry | HttpRequestException |
TimeoutRejectedException and BrokenCircuitException share the base Polly.ExecutionRejectedException. Code that
only catches HttpRequestException/TaskCanceledException lets them escape:
catch (Exception ex) when (ex is HttpRequestException or Polly.ExecutionRejectedException)
{
throw new PartnerUnavailableException("…", ex);
}
Set HttpClient.Timeout = Timeout.InfiniteTimeSpan on such a client: HttpClient.Timeout covers the whole
retry sequence and would cut it short; TimeoutSeconds bounds each attempt.
Retries apply to every HTTP method, POST included. Do not put AddTResilienceHandler() on a client that performs
non-idempotent writes unless the partner deduplicates them.
⚙️ Core Components
AddTHttpClient<TClient, TImpl>: Initializes an Http Client accompanied by Polly v8 Resilience Handler, Context Propagation (propagates TenantId, CorrelationId), Latency Diagnostics, and Health Checks (Dependency).AddTResilienceHandler: Automatically registers Retry, Circuit Breaker, and Timeout.AddTContextPropagation: RegistersTContextPropagationHandlerto automatically attachIWorkContextinformation from the current Request to the Outgoing HTTP Headers.AddTDynamicRouting<THandler>: Supports Dynamic Routing by passing a custom MessageHandler that inherits fromTDynamicRoutingHandler.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
-
net8.0
- Elastic.CommonSchema (>= 8.11.0)
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 9.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Http.Resilience (>= 9.1.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Polly (>= 8.5.1)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
- System.Threading.Channels (>= 8.0.0)
- TCIS.Core (>= 1.0.9)
- TCIS.Diagnostics.Advanced (>= 1.0.9)
- TCIS.Logging (>= 1.0.9)
- TCIS.Logging.Abstractions (>= 1.0.9)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on TCIS.Http:
| Package | Downloads |
|---|---|
|
TCIS.Http.Grpc
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. gRPC client and server integration for TCIS Framework. |
|
|
TCIS.Http.RestEase
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. RestEase client integration for TCIS Framework. |
|
|
TCIS.Http.Refit
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Refit client integration for TCIS Framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.2 | 0 | 11/10/2026 |
| 1.1.1 | 53 | 11/9/2026 |
| 1.1.0 | 61 | 11/7/2026 |
| 1.0.9 | 88 | 11/5/2026 |
| 1.0.9-rc.2 | 68 | 11/5/2026 |
| 1.0.9-rc.1 | 80 | 11/4/2026 |
| 1.0.8 | 132 | 11/3/2026 |
| 1.0.8-rc.11 | 85 | 10/30/2026 |
| 1.0.8-rc.10 | 83 | 10/30/2026 |
| 1.0.8-rc.9 | 86 | 10/30/2026 |
| 1.0.8-rc.8 | 84 | 10/29/2026 |
| 1.0.8-rc.7 | 86 | 10/27/2026 |
| 1.0.8-rc.6 | 90 | 10/27/2026 |
| 1.0.8-rc.5 | 91 | 10/23/2026 |
| 1.0.8-rc.4 | 92 | 10/23/2026 |
| 1.0.8-rc.3 | 88 | 10/23/2026 |
| 1.0.8-rc.2 | 93 | 10/22/2026 |
| 1.0.8-rc.1 | 89 | 10/22/2026 |
| 1.0.7 | 144 | 10/22/2026 |
| 1.0.6-rc.1 | 79 | 10/20/2026 |