Class HttpEndpointOptions

Namespace: redb.Route.Http
Assembly: redb.Route.Http.dll

Options for the HTTP endpoint. Shared by both producer and consumer.
Use URI parameters to configure: http:host:port/path?method=POST&timeout=30000

public class HttpEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→HttpEndpointOptions

Inherited Members

Properties

AuthScheme

Authentication scheme. Default: None.

[EndpointRole(EndpointRole.Producer)]
public HttpAuthScheme AuthScheme { get; set; }

AuthToken

Bearer token value (or expression) for Bearer auth.

[EndpointRole(EndpointRole.Producer)]
public DynamicValue<string>? AuthToken { get; set; }

ConnectionFactory

Named from the route registry. Lets Basic/Bearer

[RegistryReference(typeof(HttpConnectionFactory))]
public string? ConnectionFactory { get; set; }

ContentType

Content-Type header value for outgoing requests/responses. Default: application/json.

public string ContentType { get; set; }

Cors

Enable CORS for all origins. Default: false.

public bool Cors { get; set; }

CorsCredentials

Enable Access-Control-Allow-Credentials header. Default: false.

public bool CorsCredentials { get; set; }

CorsOrigins

CORS allowed origins (comma-separated). Default: * when CORS is enabled.

public string? CorsOrigins { get; set; }

CorsOriginsResolver

Optional per-request CORS-origin resolver. When set, takes precedence over

public Func<HttpRequest, string?>? CorsOriginsResolver { get; set; }

FollowRedirects

Follow HTTP redirects. Default: true.

public bool FollowRedirects { get; set; }

HeaderFilterStrategy

A registry reference (#name) to an that decides

[RegistryReference(typeof(IHeaderFilterStrategy))]
public string? HeaderFilterStrategy { get; set; }

Host

Bind host for the embedded HTTP server. Default: 0.0.0.0.

public string Host { get; set; }

InboundAuth

Consumer only: how an inbound request proves who it is. Basic checks the Authorization header

[EndpointRole(EndpointRole.Consumer)]
public HttpAuthScheme InboundAuth { get; set; }

InboundPassword

Consumer only: the password inboundAuth=basic accepts. Take it from configuration ({{…}}).

[EndpointRole(EndpointRole.Consumer)]
public string? InboundPassword { get; set; }

InboundRealm

Consumer only: the realm named in WWW-Authenticate. Default redb.

[EndpointRole(EndpointRole.Consumer)]
public string InboundRealm { get; set; }

InboundUsername

Consumer only: the user name inboundAuth=basic accepts.

[EndpointRole(EndpointRole.Consumer)]
public string? InboundUsername { get; set; }

InOut

If true, the consumer returns the exchange Out body as the HTTP response (InOut pattern).

public bool InOut { get; set; }

MaxConcurrentRequests

Maximum concurrent executions of this consumer's pipeline. 0 (default) = unlimited —

public int MaxConcurrentRequests { get; set; }

MaxRedirects

Maximum number of automatic redirects. Default: 50.

public int MaxRedirects { get; set; }

MaxRequestBodySize

Maximum request body size in bytes. Default: 10 MB (10485760). 0 = unlimited.

public long MaxRequestBodySize { get; set; }

Method

HTTP method. Default: GET for producer, all methods accepted for consumer.

public HttpMethod Method { get; set; }

Methods

Comma-separated list of allowed HTTP methods for the consumer.

public string? Methods { get; set; }

Password

Password for Basic auth.

[EndpointRole(EndpointRole.Producer)]
public string? Password { get; set; }

Port

Bind port for the embedded HTTP server. Default: 8080.

public int Port { get; set; }

PreserveHostHeader

Preserve the Host header from the original request. Default: false.

public bool PreserveHostHeader { get; set; }

Protocol

HTTP protocol version for the consumer. Default: Http1And2.

public HttpProtocol Protocol { get; set; }

RejectStatusCode

Status code for a shed request. Default 429 Too Many Requests.

public int RejectStatusCode { get; set; }

RequestQueueLimit

How many requests over the limit WAIT for a permit (FIFO) instead of being rejected.

public int RequestQueueLimit { get; set; }

ResponseCode

Response status code for successful processing. Default: 200.

public int ResponseCode { get; set; }

RetryAfterSeconds

Value of the Retry-After header on a shed request; 0 = do not send it. Default 1.

public int RetryAfterSeconds { get; set; }

SkipControlHeaders

Do not let the control headers on the exchange — redbHttp.Method, redbHttp.Query — steer the

[EndpointRole(EndpointRole.Producer)]
public bool SkipControlHeaders { get; set; }

SkipRequestHeaders

Do not map the exchange headers to request headers at all; only the fields the producer sets itself go out.

[EndpointRole(EndpointRole.Producer)]
public bool SkipRequestHeaders { get; set; }

SkipResponseHeaders

Do not map the response headers to exchange headers; the status, URL and content type are still set.

[EndpointRole(EndpointRole.Producer)]
public bool SkipResponseHeaders { get; set; }

Ssl

Enable HTTPS for the consumer. Default: false.

public bool Ssl { get; set; }

SslCertPassword

Password for the PFX certificate.

public string? SslCertPassword { get; set; }

SslCertPath

Path to PFX certificate file for HTTPS. Required when ssl=true.

public string? SslCertPath { get; set; }

StreamRequest

If true, enables streaming of request body instead of buffering.

public bool StreamRequest { get; set; }

StreamResponse

If true, the producer sets the exchange Out body to a Stream instead of byte[].

public bool StreamResponse { get; set; }

ThrowOnError

Throw an exception on HTTP 4xx/5xx responses. Default: true.

public bool ThrowOnError { get; set; }

Timeout

Request/response timeout in milliseconds. Default: 30000 (30s). Producer only.

public int Timeout { get; set; }

TokenValidator

Consumer only: registry name of the for inboundAuth=bearer, #name or name.

[EndpointRole(EndpointRole.Consumer)]
[RegistryReference(typeof(IHttpTokenValidator))]
public string? TokenValidator { get; set; }

Username

Username for Basic auth.

[EndpointRole(EndpointRole.Producer)]
public string? Username { get; set; }

Methods

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()