Soenneker.N8n.HttpClients
4.0.136
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.N8n.HttpClients --version 4.0.136
NuGet\Install-Package Soenneker.N8n.HttpClients -Version 4.0.136
<PackageReference Include="Soenneker.N8n.HttpClients" Version="4.0.136" />
<PackageVersion Include="Soenneker.N8n.HttpClients" Version="4.0.136" />
<PackageReference Include="Soenneker.N8n.HttpClients" />
paket add Soenneker.N8n.HttpClients --version 4.0.136
#r "nuget: Soenneker.N8n.HttpClients, 4.0.136"
#:package Soenneker.N8n.HttpClients@4.0.136
#addin nuget:?package=Soenneker.N8n.HttpClients&version=4.0.136
#tool nuget:?package=Soenneker.N8n.HttpClients&version=4.0.136
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 | 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.887)
- Soenneker.Hashing.XxHash (>= 4.0.94)
- Soenneker.Utils.HttpClientCache.Ssrf (>= 4.0.52)
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 |
|---|---|---|
| 4.0.183 | 91 | 10/15/2026 |
| 4.0.182 | 77 | 10/15/2026 |
| 4.0.181 | 74 | 10/14/2026 |
| 4.0.179 | 87 | 10/14/2026 |
| 4.0.178 | 85 | 10/14/2026 |
| 4.0.177 | 88 | 10/14/2026 |
| 4.0.171 | 87 | 10/13/2026 |
| 4.0.170 | 86 | 10/13/2026 |
| 4.0.166 | 93 | 10/12/2026 |
| 4.0.165 | 81 | 10/12/2026 |
| 4.0.163 | 87 | 10/11/2026 |
| 4.0.162 | 84 | 10/11/2026 |
| 4.0.161 | 83 | 10/11/2026 |
| 4.0.160 | 162 | 10/9/2026 |
| 4.0.159 | 198 | 10/1/2026 |
| 4.0.158 | 128 | 9/29/2026 |
| 4.0.157 | 108 | 9/29/2026 |
| 4.0.156 | 140 | 9/26/2026 |
| 4.0.155 | 112 | 9/26/2026 |
| 4.0.136 | 91 | 9/13/2026 |