redb.Route.Http
3.3.0
Prefix Reserved
See the version list below for details.
dotnet add package redb.Route.Http --version 3.3.0
NuGet\Install-Package redb.Route.Http -Version 3.3.0
<PackageReference Include="redb.Route.Http" Version="3.3.0" />
<PackageVersion Include="redb.Route.Http" Version="3.3.0" />
<PackageReference Include="redb.Route.Http" />
paket add redb.Route.Http --version 3.3.0
#r "nuget: redb.Route.Http, 3.3.0"
#:package redb.Route.Http@3.3.0
#addin nuget:?package=redb.Route.Http&version=3.3.0
#tool nuget:?package=redb.Route.Http&version=3.3.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.
Part of
redb.Route — ESB & EIP Framework for .NET
| 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 (>= 3.3.0)
-
net8.0
- redb.Route (>= 3.3.0)
-
net9.0
- redb.Route (>= 3.3.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.Core.Module
redb.Tsak .tpkg host glue for redb.Identity.Core — IRouteModule entry point, configuration binding and named-redb wiring. |
|
|
redb.Identity.Http
HTTP / HTTPS facade for redb.Identity — OIDC discovery, token, authorize, userinfo, introspect, revoke, JWKS, PAR, DCR, SCIM, /me and management endpoints. |
GitHub repositories
This package is not used by any popular GitHub repositories.