Soenneker.Bandwidth.HttpClients
4.0.99
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Bandwidth.HttpClients --version 4.0.99
NuGet\Install-Package Soenneker.Bandwidth.HttpClients -Version 4.0.99
<PackageReference Include="Soenneker.Bandwidth.HttpClients" Version="4.0.99" />
<PackageVersion Include="Soenneker.Bandwidth.HttpClients" Version="4.0.99" />
<PackageReference Include="Soenneker.Bandwidth.HttpClients" />
paket add Soenneker.Bandwidth.HttpClients --version 4.0.99
#r "nuget: Soenneker.Bandwidth.HttpClients, 4.0.99"
#:package Soenneker.Bandwidth.HttpClients@4.0.99
#addin nuget:?package=Soenneker.Bandwidth.HttpClients&version=4.0.99
#tool nuget:?package=Soenneker.Bandwidth.HttpClients&version=4.0.99
Soenneker.Bandwidth.HttpClients
Provides a cached, authenticated HttpClient for the Bandwidth OpenAPI client.
Installation
dotnet add package Soenneker.Bandwidth.HttpClients
Configuration
{
"Bandwidth": {
"ApiKey": "your-token",
"ClientBaseUrl": "https://api.bandwidth.com/api/v2/",
"AuthHeaderName": "Authorization",
"AuthHeaderValueTemplate": "Bearer {token}"
}
}
Bandwidth:ApiKey is required. The other values shown are the defaults.
Bandwidth's combined API surface uses more than one authentication scheme. Set the header template for the particular service you call. For a Basic credential that has already been Base64-encoded, use Basic {token}. Endpoints requiring multiple credential headers need a separately configured Kiota authentication provider rather than this single-header transport wrapper.
Registration
using Soenneker.Bandwidth.HttpClients.Registrars;
services.AddBandwidthOpenApiHttpClientAsSingleton();
AddBandwidthOpenApiHttpClientAsScoped() is also available. Both registrations use the singleton HTTP-client cache.
Usage
using Soenneker.Bandwidth.HttpClients.Abstract;
public sealed class BandwidthTransport
{
private readonly IBandwidthOpenApiHttpClient _clientProvider;
public BandwidthTransport(IBandwidthOpenApiHttpClient clientProvider)
{
_clientProvider = clientProvider;
}
public async Task<HttpResponseMessage> Send(HttpRequestMessage request, CancellationToken cancellationToken = default)
{
HttpClient client = await _clientProvider.Get(cancellationToken);
return await client.SendAsync(request, cancellationToken);
}
}
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 | 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.871)
- Soenneker.Utils.HttpClientCache (>= 4.0.2050)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Bandwidth.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.Bandwidth.OpenApiClientUtil
A thread-safe utility for obtaining Bandwidth's OpenApiClient singleton. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.110 | 0 | 9/5/2026 |
| 4.0.109 | 0 | 9/5/2026 |
| 4.0.108 | 32 | 9/4/2026 |
| 4.0.106 | 53 | 9/4/2026 |
| 4.0.105 | 60 | 9/4/2026 |
| 4.0.103 | 63 | 9/4/2026 |
| 4.0.102 | 71 | 9/3/2026 |
| 4.0.101 | 112 | 9/1/2026 |
| 4.0.100 | 78 | 9/1/2026 |
| 4.0.99 | 73 | 8/31/2026 |
| 4.0.98 | 102 | 8/31/2026 |
| 4.0.97 | 85 | 8/31/2026 |
| 4.0.96 | 118 | 8/30/2026 |
| 4.0.95 | 84 | 8/30/2026 |
| 4.0.94 | 129 | 8/30/2026 |
| 4.0.93 | 107 | 8/30/2026 |
| 4.0.92 | 138 | 8/26/2026 |
| 4.0.91 | 98 | 8/26/2026 |
| 4.0.90 | 100 | 8/26/2026 |
| 4.0.89 | 97 | 8/25/2026 |