Soenneker.SendGrid.HttpClients
11.0.170
Prefix Reserved
dotnet add package Soenneker.SendGrid.HttpClients --version 11.0.170
NuGet\Install-Package Soenneker.SendGrid.HttpClients -Version 11.0.170
<PackageReference Include="Soenneker.SendGrid.HttpClients" Version="11.0.170" />
<PackageVersion Include="Soenneker.SendGrid.HttpClients" Version="11.0.170" />
<PackageReference Include="Soenneker.SendGrid.HttpClients" />
paket add Soenneker.SendGrid.HttpClients --version 11.0.170
#r "nuget: Soenneker.SendGrid.HttpClients, 11.0.170"
#:package Soenneker.SendGrid.HttpClients@11.0.170
#addin nuget:?package=Soenneker.SendGrid.HttpClients&version=11.0.170
#tool nuget:?package=Soenneker.SendGrid.HttpClients&version=11.0.170
Soenneker.SendGrid.HttpClients
Provides a cached HttpClient for SendGrid mail, contacts, lists, templates, suppressions, statistics, settings, webhooks, and account APIs.
Installation
dotnet add package Soenneker.SendGrid.HttpClients
Configuration
{
"SendGrid": {
"ApiKey": "SG.xxxxxxxxx"
}
}
Usage
using Soenneker.SendGrid.HttpClients.Abstract;
using Soenneker.SendGrid.HttpClients.Registrars;
services.AddSendGridOpenApiHttpClientAsSingleton();
public sealed class SendGridScopeReader
{
private readonly ISendGridOpenApiHttpClient _sendGrid;
public SendGridScopeReader(ISendGridOpenApiHttpClient sendGrid)
{
_sendGrid = sendGrid;
}
public async Task<string> GetScopes(CancellationToken cancellationToken)
{
HttpClient client = await _sendGrid.Get(cancellationToken);
return await client.GetStringAsync("v3/scopes", cancellationToken);
}
}
The provider sends Authorization: Bearer <api-key> and targets https://api.sendgrid.com/. SendGrid:ClientBaseUrl, SendGrid:AuthHeaderName, and SendGrid:AuthHeaderValueTemplate can override those defaults for a proxy or compatible service; use {token} in the value template where the configured key should be inserted.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Extensions.Configuration (>= 11.0.917)
- Soenneker.Utils.HttpClientCache (>= 11.0.2152)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.SendGrid.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.SendGrid.OpenApiClientUtil
Provides a lazily initialized, authenticated SendGrid v3 API client. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.170 | 100 | 11/11/2026 |
| 11.0.169 | 91 | 11/11/2026 |
| 11.0.168 | 87 | 11/11/2026 |
| 11.0.167 | 79 | 11/11/2026 |
| 11.0.166 | 220 | 11/3/2026 |
| 11.0.165 | 91 | 11/3/2026 |
| 11.0.164 | 121 | 11/3/2026 |
| 11.0.163 | 104 | 11/3/2026 |
| 11.0.162 | 116 | 11/3/2026 |
| 11.0.161 | 323 | 10/27/2026 |
| 11.0.160 | 132 | 10/27/2026 |
| 11.0.159 | 127 | 10/26/2026 |
| 11.0.158 | 115 | 10/26/2026 |
| 11.0.157 | 99 | 10/26/2026 |
| 4.0.156 | 150 | 10/15/2026 |
| 4.0.155 | 101 | 10/15/2026 |
| 4.0.154 | 95 | 10/14/2026 |
| 4.0.152 | 123 | 10/14/2026 |
| 4.0.151 | 89 | 10/14/2026 |
| 4.0.150 | 108 | 10/14/2026 |
Updated Soenneker.Utils.HttpClientCache to 11.0.2152