Soenneker.Docker.Hub.HttpClients
4.0.61
Prefix Reserved
dotnet add package Soenneker.Docker.Hub.HttpClients --version 4.0.61
NuGet\Install-Package Soenneker.Docker.Hub.HttpClients -Version 4.0.61
<PackageReference Include="Soenneker.Docker.Hub.HttpClients" Version="4.0.61" />
<PackageVersion Include="Soenneker.Docker.Hub.HttpClients" Version="4.0.61" />
<PackageReference Include="Soenneker.Docker.Hub.HttpClients" />
paket add Soenneker.Docker.Hub.HttpClients --version 4.0.61
#r "nuget: Soenneker.Docker.Hub.HttpClients, 4.0.61"
#:package Soenneker.Docker.Hub.HttpClients@4.0.61
#addin nuget:?package=Soenneker.Docker.Hub.HttpClients&version=4.0.61
#tool nuget:?package=Soenneker.Docker.Hub.HttpClients&version=4.0.61
Soenneker.Docker.Hub.HttpClients
Provides a cached HttpClient configured for the Docker Hub API and bearer authentication.
Installation
dotnet add package Soenneker.Docker.Hub.HttpClients
Configuration
{
"DockerHub": {
"AccessToken": "your-access-token"
}
}
Keep the token in a secret provider rather than source control.
The transport can also be customized with these optional settings:
{
"Hub": {
"ClientBaseUrl": "https://hub.docker.com",
"AuthHeaderName": "Authorization",
"AuthHeaderValueTemplate": "Bearer {token}"
}
}
The template replaces every literal {token} with DockerHub:AccessToken. Treat the base URL, header name, and template as trusted configuration because they determine where and how the credential is sent.
Registration and use
using Soenneker.Docker.Hub.HttpClients.Abstract;
using Soenneker.Docker.Hub.HttpClients.Registrars;
services.AddDockerHubOpenApiHttpClientAsSingleton();
public sealed class DockerHubTransport(IDockerHubOpenApiHttpClient clientProvider)
{
public async Task<HttpResponseMessage> Send(
HttpRequestMessage request,
CancellationToken cancellationToken)
{
HttpClient client = await clientProvider.Get(cancellationToken);
return await client.SendAsync(request, cancellationToken);
}
}
Get returns the cached client. Do not dispose the returned HttpClient; the registered provider owns the cache entry.
Singleton registration is the normal choice for direct transport use. AddDockerHubOpenApiHttpClientAsScoped() creates a separately owned cache entry for each scope, so disposing one provider cannot remove another provider's client.
This package only configures transport. It does not deserialize responses, paginate results, or convert non-success status codes into domain exceptions. Use the companion OpenAPI client utility when you want the generated Docker Hub API surface.
| 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.898)
- Soenneker.Utils.HttpClientCache (>= 4.0.2101)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Docker.Hub.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.Docker.Hub.OpenApiClientUtil
Provides a cached Docker Hub OpenAPI client backed by the configured Docker Hub HttpClient. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.61 | 65 | 10/1/2026 |
| 4.0.60 | 90 | 9/29/2026 |
| 4.0.59 | 86 | 9/29/2026 |
| 4.0.58 | 103 | 9/26/2026 |
| 4.0.57 | 97 | 9/25/2026 |
| 4.0.56 | 98 | 9/25/2026 |
| 4.0.55 | 86 | 9/24/2026 |
| 4.0.54 | 163 | 9/17/2026 |
| 4.0.53 | 102 | 9/16/2026 |
| 4.0.52 | 100 | 9/16/2026 |
| 4.0.51 | 102 | 9/16/2026 |
| 4.0.50 | 91 | 9/16/2026 |
| 4.0.49 | 126 | 9/15/2026 |
| 4.0.48 | 86 | 9/15/2026 |
| 4.0.47 | 95 | 9/15/2026 |
| 4.0.46 | 122 | 9/13/2026 |
| 4.0.45 | 106 | 9/13/2026 |
| 4.0.44 | 104 | 9/13/2026 |
| 4.0.43 | 109 | 9/13/2026 |
| 4.0.42 | 113 | 9/12/2026 |