Koras.ApiClient
0.1.0-preview.1
dotnet add package Koras.ApiClient --version 0.1.0-preview.1
NuGet\Install-Package Koras.ApiClient -Version 0.1.0-preview.1
<PackageReference Include="Koras.ApiClient" Version="0.1.0-preview.1" />
<PackageVersion Include="Koras.ApiClient" Version="0.1.0-preview.1" />
<PackageReference Include="Koras.ApiClient" />
paket add Koras.ApiClient --version 0.1.0-preview.1
#r "nuget: Koras.ApiClient, 0.1.0-preview.1"
#:package Koras.ApiClient@0.1.0-preview.1
#addin nuget:?package=Koras.ApiClient&version=0.1.0-preview.1&prerelease
#tool nuget:?package=Koras.ApiClient&version=0.1.0-preview.1&prerelease
Koras.ApiClient
A resilient, observable, secure-by-default HTTP API client framework for enterprise .NET applications — authentication, retries, circuit breaking, pagination, caching, correlation IDs, telemetry, and normalized errors, composed on HttpClientFactory.
Quick start
builder.Services
.AddKorasApiClient(options => options.BaseAddress = new Uri("https://api.example.com/"))
.WithApiKey(key => key.ApiKey = builder.Configuration["Example:ApiKey"]!);
public sealed class TodoService(IApiClient api)
{
public async Task<Todo?> GetAsync(int id, CancellationToken ct)
{
ApiResponse<Todo> response = await api.Get($"todos/{id}").SendAsync<Todo>(ct);
if (response.Error?.Category == ApiErrorCategory.NotFound)
return null;
return response.GetValueOrThrow();
}
}
Every request gets bounded retries with jitter, a circuit breaker, timeouts, a correlation ID, structured logs, and an OpenTelemetry-ready span and metrics — with zero extra configuration. Every failure (network, timeout, 4xx/5xx, deserialization) is a categorized ApiError, never an unhandled exception.
Highlights
- Fluent requests —
client.Post("orders").WithJsonBody(order).SendAsync<OrderCreated>(ct) - Auth included — API key, bearer tokens (
IAccessTokenProvider), OAuth 2.0 client credentials with cached single-flight refresh - Pagination —
client.PaginateAsync(...)asIAsyncEnumerable<T>with bounded pages - Testable — pair with
Koras.ApiClient.Testingto unit-test without a network
Documentation: https://github.com/KKORA/koras-api-client/tree/main/docs
| 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 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 is compatible. 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. |
-
net10.0
- Koras.ApiClient.Abstractions (>= 0.1.0-preview.1)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Http.Resilience (>= 10.8.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net8.0
- Koras.ApiClient.Abstractions (>= 0.1.0-preview.1)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Http.Resilience (>= 10.8.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net9.0
- Koras.ApiClient.Abstractions (>= 0.1.0-preview.1)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Http.Resilience (>= 10.8.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Koras.ApiClient:
| Package | Downloads |
|---|---|
|
Koras.ApiClient.Testing
Test doubles for Koras.ApiClient: MockApiHandler scripts HTTP responses (JSON, ProblemDetails, sequences, exceptions) and records every request, while KorasApiClientTestFactory builds a real client over the mock transport — unit-test your API integrations without a network. Test-framework agnostic. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.1 | 68 | 7/16/2026 |