Soenneker.Zendesk.HttpClients
4.0.56
Prefix Reserved
dotnet add package Soenneker.Zendesk.HttpClients --version 4.0.56
NuGet\Install-Package Soenneker.Zendesk.HttpClients -Version 4.0.56
<PackageReference Include="Soenneker.Zendesk.HttpClients" Version="4.0.56" />
<PackageVersion Include="Soenneker.Zendesk.HttpClients" Version="4.0.56" />
<PackageReference Include="Soenneker.Zendesk.HttpClients" />
paket add Soenneker.Zendesk.HttpClients --version 4.0.56
#r "nuget: Soenneker.Zendesk.HttpClients, 4.0.56"
#:package Soenneker.Zendesk.HttpClients@4.0.56
#addin nuget:?package=Soenneker.Zendesk.HttpClients&version=4.0.56
#tool nuget:?package=Soenneker.Zendesk.HttpClients&version=4.0.56
Soenneker.Zendesk.HttpClients
Provides a cached HttpClient configured for one Zendesk account and authentication credential.
Install
dotnet add package Soenneker.Zendesk.HttpClients
Configuration
For API-token authentication, Base64-encode the UTF-8 value {email_address}/token:{api_token} and supply the result as Credentials:
{
"Zendesk": {
"ClientBaseUrl": "https://acme.zendesk.com/",
"Credentials": "base64-encoded-credentials"
}
}
The default header is Authorization: Basic {token}. OAuth can be configured without changing code:
{
"Zendesk": {
"ClientBaseUrl": "https://acme.zendesk.com/",
"Credentials": "oauth-access-token",
"AuthHeaderValueTemplate": "Bearer {token}"
}
}
AuthHeaderName can override the header name when required. ClientBaseUrl should be the account origin; generated API paths already include /api/v2.
Registration
using Soenneker.Zendesk.HttpClients.Registrars;
services.AddZendeskOpenApiHttpClientAsSingleton();
Scoped registration is also available:
services.AddZendeskOpenApiHttpClientAsScoped();
Usage
public sealed class ZendeskTicketReader
{
private readonly IZendeskOpenApiHttpClient _zendesk;
public ZendeskTicketReader(IZendeskOpenApiHttpClient zendesk)
{
_zendesk = zendesk;
}
public async Task<string> GetTickets(CancellationToken cancellationToken)
{
HttpClient client = await _zendesk.Get(cancellationToken);
return await client.GetStringAsync("api/v2/tickets.json", cancellationToken);
}
}
Each provider owns its cached named client. Disposing the provider removes that client from the shared cache; disposing the cache itself remains the responsibility of its DI lifetime.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Soenneker.Extensions.Configuration (>= 4.0.895)
- Soenneker.Utils.HttpClientCache (>= 4.0.2090)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Zendesk.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.Zendesk.OpenApiClientUtil
Provides a cached Zendesk OpenAPI client over the configured shared HTTP transport. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.56 | 119 | 9/17/2026 |
| 4.0.55 | 85 | 9/16/2026 |
| 4.0.54 | 112 | 9/16/2026 |
| 4.0.53 | 90 | 9/16/2026 |
| 4.0.52 | 95 | 9/16/2026 |
| 4.0.51 | 91 | 9/15/2026 |
| 4.0.50 | 147 | 9/13/2026 |
| 4.0.49 | 98 | 9/13/2026 |
| 4.0.48 | 109 | 9/13/2026 |
| 4.0.47 | 97 | 9/13/2026 |
| 4.0.46 | 105 | 9/12/2026 |
| 4.0.43 | 136 | 9/9/2026 |
| 4.0.42 | 103 | 9/9/2026 |
| 4.0.41 | 110 | 9/8/2026 |
| 4.0.40 | 127 | 9/8/2026 |
| 4.0.39 | 120 | 9/8/2026 |
| 4.0.38 | 108 | 9/7/2026 |
| 4.0.37 | 117 | 9/7/2026 |
| 4.0.36 | 111 | 9/7/2026 |
| 4.0.35 | 113 | 9/5/2026 |