Soenneker.Bunny.HttpClients
11.0.178
Prefix Reserved
dotnet add package Soenneker.Bunny.HttpClients --version 11.0.178
NuGet\Install-Package Soenneker.Bunny.HttpClients -Version 11.0.178
<PackageReference Include="Soenneker.Bunny.HttpClients" Version="11.0.178" />
<PackageVersion Include="Soenneker.Bunny.HttpClients" Version="11.0.178" />
<PackageReference Include="Soenneker.Bunny.HttpClients" />
paket add Soenneker.Bunny.HttpClients --version 11.0.178
#r "nuget: Soenneker.Bunny.HttpClients, 11.0.178"
#:package Soenneker.Bunny.HttpClients@11.0.178
#addin nuget:?package=Soenneker.Bunny.HttpClients&version=11.0.178
#tool nuget:?package=Soenneker.Bunny.HttpClients&version=11.0.178
Soenneker.Bunny.HttpClients
Provides a cached, authenticated HttpClient for bunny.net APIs.
Installation
dotnet add package Soenneker.Bunny.HttpClients
Configuration
{
"Bunny": {
"ApiKey": "your-access-key"
}
}
Bunny:ApiKey is required. The defaults are https://api.bunny.net and AccessKey: {token}. Bunny:ClientBaseUrl, Bunny:AuthHeaderName, and Bunny:AuthHeaderValueTemplate can override them.
bunny.net products do not all use the same host or credential. Configure the base URL and header for the product you call; storage zones, Stream, JWT-authenticated endpoints, and other specialized APIs may require a different key or authentication format.
Registration
using Soenneker.Bunny.HttpClients.Registrars;
services.AddBunnyOpenApiHttpClientAsSingleton();
AddBunnyOpenApiHttpClientAsScoped() is also available. Both registrations use the singleton HTTP-client cache.
Usage
using Soenneker.Bunny.HttpClients.Abstract;
HttpClient client = await clientProvider.Get(cancellationToken);
using HttpResponseMessage response = await client.GetAsync("pullzone", cancellationToken);
response.EnsureSuccessStatusCode();
Get() creates the named client on first use and returns it afterward. Configuration changes do not rebuild an existing client. Do not dispose the returned HttpClient per request. Disposing the provider removes and disposes its named client from the cache.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Extensions.Configuration (>= 11.0.921)
- Soenneker.Utils.HttpClientCache (>= 11.0.2188)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Bunny.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.Bunny.OpenApiClientUtil
A thread-safe utility for obtaining Bunny's OpenApiClient singleton. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.178 | 58 | 12/3/2026 |
| 11.0.177 | 51 | 12/3/2026 |
| 11.0.176 | 60 | 12/3/2026 |
| 11.0.175 | 58 | 12/3/2026 |
| 11.0.174 | 61 | 12/3/2026 |
| 11.0.173 | 57 | 12/2/2026 |
| 11.0.172 | 58 | 12/2/2026 |
| 11.0.170 | 61 | 12/2/2026 |
| 11.0.169 | 81 | 12/2/2026 |
| 11.0.168 | 66 | 12/2/2026 |
| 11.0.167 | 64 | 12/2/2026 |
| 11.0.166 | 110 | 12/1/2026 |
| 11.0.165 | 111 | 12/1/2026 |
| 11.0.164 | 101 | 12/1/2026 |
| 11.0.163 | 104 | 12/1/2026 |
| 11.0.162 | 106 | 11/30/2026 |
| 11.0.161 | 93 | 11/30/2026 |
| 11.0.160 | 121 | 11/30/2026 |
| 11.0.159 | 107 | 11/30/2026 |
| 11.0.158 | 91 | 11/29/2026 |
Updated Multiple NuGet packages