Soenneker.N8n.HttpClients
11.0.227
Prefix Reserved
dotnet add package Soenneker.N8n.HttpClients --version 11.0.227
NuGet\Install-Package Soenneker.N8n.HttpClients -Version 11.0.227
<PackageReference Include="Soenneker.N8n.HttpClients" Version="11.0.227" />
<PackageVersion Include="Soenneker.N8n.HttpClients" Version="11.0.227" />
<PackageReference Include="Soenneker.N8n.HttpClients" />
paket add Soenneker.N8n.HttpClients --version 11.0.227
#r "nuget: Soenneker.N8n.HttpClients, 11.0.227"
#:package Soenneker.N8n.HttpClients@11.0.227
#addin nuget:?package=Soenneker.N8n.HttpClients&version=11.0.227
#tool nuget:?package=Soenneker.N8n.HttpClients&version=11.0.227
Soenneker.N8n.HttpClients
Provides cached, API-key-authenticated HttpClient instances for one or more n8n servers.
Installation
dotnet add package Soenneker.N8n.HttpClients
Configuration
{
"N8n": {
"ApiKey": "your-api-key",
"ClientBaseUrl": "https://n8n.example.com/api/v1"
}
}
Usage
using Soenneker.N8n.HttpClients.Abstract;
using Soenneker.N8n.HttpClients.Registrars;
services.AddN8nOpenApiHttpClientAsSingleton();
IN8nOpenApiHttpClient n8n = serviceProvider
.GetRequiredService<IN8nOpenApiHttpClient>();
HttpClient client = await n8n.Get(cancellationToken);
Use Get(apiKey, baseUrl) to connect to another n8n server. Equivalent connection settings reuse the same client within the provider's lifetime.
The default authentication header is X-N8N-API-KEY: {token}. N8n:AuthHeaderName and N8n:AuthHeaderValueTemplate can override it for a compatible gateway.
Do not dispose a returned HttpClient; the registered provider owns it and removes it from the cache when disposed.
Network access policy
By default, clients use ISsrfHttpClientCache: DNS is resolved and checked when
opening each socket, and the connection uses those validated addresses. Private,
loopback, and reserved addresses are blocked.
Applications that intentionally connect to private/self-hosted n8n instances can opt in through trusted application configuration:
{
"N8n": {
"AllowPrivateNetworkAccess": true
}
}
This selects ordinary IHttpClientCache for that provider. Omit the setting or
set it to false for public-only access. The policy is read when the provider is
constructed and applies to every connection it creates; do not populate it from
user-supplied connection data. Enabling it permits all destinations, not just a
particular private host.
Automatic redirects remain disabled in both modes so the API-key header cannot be forwarded by a redirect. Configure the final n8n base URL directly.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Extensions.Configuration (>= 11.0.921)
- Soenneker.Hashing.XxHash (>= 11.0.147)
- Soenneker.Utils.HttpClientCache.Ssrf (>= 11.0.136)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.N8n.HttpClients:
| Package | Downloads |
|---|---|
|
Soenneker.N8n.OpenApiClientUtil
Creates and caches authenticated n8n API clients for one or more servers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.227 | 0 | 12/2/2026 |
| 11.0.226 | 0 | 12/2/2026 |
| 11.0.225 | 0 | 12/2/2026 |
| 11.0.224 | 0 | 12/2/2026 |
| 11.0.222 | 47 | 12/2/2026 |
| 11.0.221 | 46 | 12/2/2026 |
| 11.0.220 | 52 | 12/2/2026 |
| 11.0.219 | 66 | 12/1/2026 |
| 11.0.218 | 63 | 12/1/2026 |
| 11.0.217 | 58 | 12/1/2026 |
| 11.0.216 | 58 | 12/1/2026 |
| 11.0.215 | 58 | 12/1/2026 |
| 11.0.214 | 63 | 12/1/2026 |
| 11.0.213 | 68 | 11/30/2026 |
| 11.0.212 | 61 | 11/30/2026 |
| 11.0.211 | 90 | 11/30/2026 |
| 11.0.210 | 72 | 11/29/2026 |
| 11.0.209 | 334 | 11/19/2026 |
| 11.0.208 | 129 | 11/19/2026 |
Updated Multiple NuGet packages