Soenneker.N8n.HttpClients 4.0.132

Prefix Reserved
dotnet add package Soenneker.N8n.HttpClients --version 4.0.132
                    
NuGet\Install-Package Soenneker.N8n.HttpClients -Version 4.0.132
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.N8n.HttpClients" Version="4.0.132" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.N8n.HttpClients" Version="4.0.132" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.N8n.HttpClients" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.N8n.HttpClients --version 4.0.132
                    
#r "nuget: Soenneker.N8n.HttpClients, 4.0.132"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.N8n.HttpClients@4.0.132
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.N8n.HttpClients&version=4.0.132
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.N8n.HttpClients&version=4.0.132
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.132 78 9/9/2026
4.0.131 80 9/9/2026
4.0.130 73 9/9/2026
4.0.129 66 9/9/2026
4.0.128 68 9/9/2026
4.0.127 89 9/8/2026
4.0.126 100 9/8/2026
4.0.125 97 9/8/2026
4.0.124 94 9/8/2026
4.0.123 115 9/7/2026
4.0.122 101 9/7/2026
4.0.121 94 9/7/2026
4.0.120 121 9/6/2026
4.0.119 86 9/5/2026
4.0.118 87 9/5/2026
4.0.117 117 9/4/2026
4.0.116 96 9/4/2026
4.0.115 106 9/4/2026
4.0.114 95 9/4/2026
4.0.113 99 9/4/2026
Loading failed