redb.Route.Http
4.0.0
Prefix Reserved
See the version list below for details.
dotnet add package redb.Route.Http --version 4.0.0
NuGet\Install-Package redb.Route.Http -Version 4.0.0
<PackageReference Include="redb.Route.Http" Version="4.0.0" />
<PackageVersion Include="redb.Route.Http" Version="4.0.0" />
<PackageReference Include="redb.Route.Http" />
paket add redb.Route.Http --version 4.0.0
#r "nuget: redb.Route.Http, 4.0.0"
#:package redb.Route.Http@4.0.0
#addin nuget:?package=redb.Route.Http&version=4.0.0
#tool nuget:?package=redb.Route.Http&version=4.0.0
redb.Route.Http
HTTP/HTTPS transport for redb.Route. HttpClient-based producer (outbound requests) and Kestrel-based consumer (webhook receiver) with CORS, auth, and streaming.
Installation
dotnet add package redb.Route.Http
Usage
Fluent DSL
using redb.Route.Http.Fluent;
// Outbound HTTP call (producer)
From("direct://send")
.To(Http.Post("api.example.com/orders")
.Timeout(5000)
.BearerAuth()
.ContentType("application/json"));
// Webhook receiver (consumer)
From(Http.Listen("/webhooks/orders")
.Host("0.0.0.0").Port(8080)
.Methods("POST")
.Cors("https://app.example.com")
.MaxRequestBodySize(1_048_576))
.Log("Webhook received: ${body}")
.To("direct://process");
// REST methods shorthand
From("direct://get-data")
.To(Http.Get("api.example.com/status").NoThrowOnError());
From("direct://update")
.To(Http.Put("api.example.com/orders/${header.orderId}"));
From("direct://remove")
.To(Http.Delete("api.example.com/orders/${header.orderId}"));
// HTTPS
From("direct://secure-call")
.To(Https.Post("api.example.com/data")
.BearerAuth()
.AuthToken("${property.jwt}"));
// Named parameters — {name} in URL resolved from .Param() at runtime
From("direct://get-order")
.To(Http.Get("api.example.com/orders/{orderId}")
.Param("orderId", Header("orderId")));
// Multiple named parameters + IExpression values
From("direct://user-orders")
.To(Http.Get("api.example.com/users/{userId}/orders/{status}")
.Param("userId", Header("userId"))
.Param("status", Constant("active")));
${...}expressions in URL and options are resolved per message at runtime.{name}placeholders are resolved from.Param()bindings — values are URL-encoded automatically. In fluent DSL, pass the path withouthttp:///https://— the scheme is set byHttp.vsHttps..
Raw URI (non-fluent)
// Raw URI strings include the full scheme — ${...} resolved per message
From("direct://update")
.To("https://api.example.com/orders/${header.orderId}?method=PUT");
// Fully dynamic URL — host, port, path all from expressions
From("direct://proxy")
.To("https://${header.targetHost}:${header.targetPort}/api/${header.resource}?method=POST");
Fluent Builder API
| Category | Methods |
|---|---|
| HTTP Methods | Http.Get(), Http.Post(), Http.Put(), Http.Delete(), Http.Patch(), Http.Head() |
| Consumer | Http.Listen(), .Host(), .Port(), .Methods(), .Cors(), .CorsCredentials(), .MaxRequestBodySize(), .Protocol(), .ResponseCode(), .InOut(), .StreamRequest() |
| Auth | .BasicAuth(user, pass), .BearerAuth(), .AuthToken() |
| SSL | .SslCert(path, pass?) |
| Producer | .Timeout(), .ContentType(), .NoThrowOnError(), .NoBridgeHeaders(), .NoFollowRedirects(), .MaxRedirects(), .NoCopyResponseHeaders(), .PreserveHostHeader() |
| Parameters | .Param(name, value), .Param(name, IExpression) — bind {name} URL placeholders |
Most builder methods (Timeout, BasicAuth, AuthToken, MaxRedirects, Host, Port, MaxRequestBodySize, SslCert, ResponseCode) accept both constant values and
IExpressionfor runtime resolution.
Schemes
Both http and https schemes are supported. Use Https.Get(...) / Https.Post(...) for TLS endpoints.
Routing precedence (shared server)
Multiple consumers can register routes on the same (host, port) — they share one
Kestrel server. When several routes match the same request path, the most specific
path wins, not the first one registered:
- Concrete/literal paths (
/api/echo) before route-parameter paths (/api/{id}). - Fewer route parameters before more.
- Catch-all templates (
/{**path}) are tried last. - Registration order breaks ties (first-registered wins among equal specificity).
This means a concrete path and a catch-all fallback can coexist on one port — e.g. a
dispatcher mounted on /{**path} plus a dedicated /api/echo route — and /api/echo
is routed to the specific handler. The same ordering drives per-route CORS dispatch.
REST DSL
A declarative facade over the same consumer and shared host (Apache Camel rest() parity):
this.Rest("/api/orders", o => { o.Port = 8080; o.BindingMode = RestBindingMode.Json; })
.Get("/{id}").Produces("application/json").OutType<Order>().To("direct:get-order") // header.id, header.query.page
.Post().Consumes("application/json").Type<Order>().To("direct:create-order") // 415 on another Content-Type
.Put("/{id}/status").To("direct:set-status")
.Delete("/{id}").Route().Process(e => e.In.Body = null); // inline steps, 204
Every verb is an ordinary route From("http://host:port/base/path?methods=GET&inOut=true"). Path
parameters arrive as header.id, query as header.query.*; the status code is the consumer's
redbHttp.ResponseCode header; no body and no status is 204. An OpenAPI 3.0.3 document is served at
{basePath}/openapi.json (RestOptions.OpenApi / OpenApiPath). Several Rest(...) declarations
share a port.
Part of
redb.Route — ESB & EIP Framework for .NET
Named connection factory
Keep credentials out of the route URI: register a factory in the context registry and reference it by name. A set-but-unknown name fails loud at startup — a typo can never silently fall back to inline URI parameters.
context.AddToRegistry("prod", new HttpConnectionFactory
{
AuthScheme = "Bearer",
AuthToken = secrets.ApiToken,
});
// http://api.internal/orders?connectionFactory=prod
Concurrency limits
Kestrel executes as many handlers as requests arrive; without a limit a route has no ceiling. The admission limit caps concurrent pipeline executions per endpoint and sheds the overflow BEFORE any pipeline work (load shedding, not backpressure):
| Parameter | Default | Description |
|---|---|---|
maxConcurrentRequests |
0 (unlimited) |
Max concurrent pipeline executions |
requestQueueLimit |
0 |
Requests over the limit that WAIT (FIFO) instead of being rejected |
rejectStatusCode |
429 |
Status for a shed request |
retryAfterSeconds |
1 |
Retry-After header value; 0 = do not send |
A shed request is answered before an exchange exists: it appears in the endpoint's Rejected
counter, not in MessagesIn or Errors. The limit is strictly per endpoint — other routes on
the same listener keep their own budget. For "slow down but do not drop" semantics use
.Threads(n) in the route instead; the two compose (the limit sheds at the door, Threads
paces inside).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- redb.Route (>= 4.0.0)
- redb.Route.Http.Hosting (>= 4.0.0)
- redb.Route.Xml (>= 4.0.0)
-
net8.0
- redb.Route (>= 4.0.0)
- redb.Route.Http.Hosting (>= 4.0.0)
- redb.Route.Xml (>= 4.0.0)
-
net9.0
- redb.Route (>= 4.0.0)
- redb.Route.Http.Hosting (>= 4.0.0)
- redb.Route.Xml (>= 4.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on redb.Route.Http:
| Package | Downloads |
|---|---|
|
redb.Tsak.Core
Kernel of redb.Tsak — runtime container for redb.Route contexts. Provides hot-reload module loading, REST management API, scheduler, monitoring, security and pluggable cluster bootstrap. |
|
|
redb.Identity.Core
OAuth 2.1 / OpenID Connect engine for redb.Identity — OpenIddict pipeline on redb.Route, redb-backed stores, MFA, WebAuthn, federation, DataProtection and signing keys. |
|
|
redb.Identity.Http
HTTP / HTTPS facade for redb.Identity — OIDC discovery, token, authorize, userinfo, introspect, revoke, JWKS, PAR, DCR, SCIM, /me and management endpoints. |
|
|
redb.Identity.Core.Module
redb.Tsak .tpkg host glue for redb.Identity.Core — IRouteModule entry point, configuration binding and named-redb wiring. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1 | 47 | 9/18/2026 |
| 4.0.0 | 205 | 9/11/2026 |
| 3.7.2 | 227 | 8/26/2026 |
| 3.7.1 | 230 | 8/26/2026 |
| 3.6.0 | 194 | 8/13/2026 |
| 3.5.1 | 199 | 8/9/2026 |
| 3.5.0 | 207 | 8/6/2026 |
| 3.4.0 | 230 | 7/27/2026 |
| 3.3.3 | 248 | 7/16/2026 |
| 3.3.1 | 482 | 7/10/2026 |
| 3.3.0 | 117 | 7/8/2026 |
| 3.2.0 | 212 | 6/29/2026 |
| 3.1.0 | 168 | 6/6/2026 |
| 3.0.1 | 140 | 6/3/2026 |
| 3.0.0 | 147 | 5/29/2026 |
| 2.0.2 | 156 | 5/16/2026 |
| 2.0.1 | 133 | 5/12/2026 |
| 2.0.0 | 131 | 5/6/2026 |