TCIS.Http.RestEase
1.0.0-rc.9
dotnet add package TCIS.Http.RestEase --version 1.0.0-rc.9
NuGet\Install-Package TCIS.Http.RestEase -Version 1.0.0-rc.9
<PackageReference Include="TCIS.Http.RestEase" Version="1.0.0-rc.9" />
<PackageVersion Include="TCIS.Http.RestEase" Version="1.0.0-rc.9" />
<PackageReference Include="TCIS.Http.RestEase" />
paket add TCIS.Http.RestEase --version 1.0.0-rc.9
#r "nuget: TCIS.Http.RestEase, 1.0.0-rc.9"
#:package TCIS.Http.RestEase@1.0.0-rc.9
#addin nuget:?package=TCIS.Http.RestEase&version=1.0.0-rc.9&prerelease
#tool nuget:?package=TCIS.Http.RestEase&version=1.0.0-rc.9&prerelease
TCIS.Http.RestEase
Integrates the RestEase library with the TCIS infrastructure. It provides mechanisms to create HTTP Clients via Interfaces (Typed Clients) supporting automatic serialization of nested objects (Complex Query Params), integrates Polly Resilience, and offers secure Context management (separating internal and external calls).
📦 Installation
dotnet add package TCIS.Http.RestEase
🚀 Usage
1. Call Internal API (Program.cs)
Use AddTInternalRestEaseClient when you need to call another microservice within the same TCIS system. The library will automatically attach IWorkContext information (such as TenantId, CorrelationId, User info) to the HTTP Headers to propagate the execution flow context.
using TCIS.Http.RestEase.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Register internal call (Includes Context Propagation and Polly Resilience)
builder.Services.AddTInternalRestEaseClient<IMyInternalService>("http://internal-service.local");
var app = builder.Build();
app.Run();
2. Call External Partner API (Program.cs)
Use AddTExternalRestEaseClient when calling 3rd-party APIs (Zalo, Momo, VNPay, etc.). This method DOES NOT attach Context Propagation to prevent leaking sensitive system information to the outside.
using TCIS.Http.RestEase.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Register external call (Only includes Polly Resilience)
builder.Services.AddTExternalRestEaseClient<IExternalPaymentApi>("https://api.vnpay.vn", client =>
{
// Additional configuration for API Key, Custom Headers for the partner
client.DefaultRequestHeaders.Add("X-API-KEY", "your-secret-key");
});
var app = builder.Build();
app.Run();
⚙️ Core Components
AddTInternalRestEaseClient<TInterface>: Used for Service-To-Service communication. IntegratesTQueryParamSerializer, Polly Resilience, and Context Propagation.AddTExternalRestEaseClient<TInterface>: Used for communication with 3rd-parties. IntegratesTQueryParamSerializer, Polly Resilience, and secures against context information leakage.
| 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
- 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)
- RestEase (>= 1.6.4)
- RestEase.HttpClientFactory (>= 1.6.4)
- TCIS.Http (>= 1.0.0-rc.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.9 | 32 | 7/21/2026 |
| 1.0.0-rc.8 | 33 | 7/21/2026 |
| 1.0.0-rc.7 | 43 | 7/17/2026 |
| 1.0.0-rc.6 | 62 | 7/7/2026 |
| 1.0.0-rc.5 | 61 | 7/7/2026 |
| 1.0.0-rc.4 | 58 | 6/24/2026 |
| 1.0.0-rc.2 | 59 | 5/12/2026 |
| 1.0.0-rc.1 | 61 | 5/12/2026 |