Class ShieldHttpHandlerOptions

Namespace
Kevlar.Extensions.Http
Assembly
Kevlar.Extensions.Http.dll

Configures safe request replay and optional endpoint routing.

public sealed class ShieldHttpHandlerOptions
Inheritance
ShieldHttpHandlerOptions
Inherited Members

Remarks

Values are snapshotted when the handler pipeline is registered or created. Later mutations do not reconfigure that pipeline; use a configuration-backed reloading registration for updates.

Constructors

ShieldHttpHandlerOptions()

public ShieldHttpHandlerOptions()

Properties

AllowUnsafeMethodReplay

Explicitly permits another attempt for methods other than GET, HEAD, OPTIONS, TRACE, PUT, and DELETE. A request factory also counts as explicit opt-in.

public bool AllowUnsafeMethodReplay { get; set; }

Property Value

bool

ContentReplayPolicy

The request-content replay policy. The default never buffers caller content.

public HttpContentReplayPolicy ContentReplayPolicy { get; set; }

Property Value

HttpContentReplayPolicy

MaxBufferSize

The maximum buffered request-content size. Defaults to 1 MiB.

public long MaxBufferSize { get; set; }

Property Value

long

RequestFactory

Optionally creates a fresh complete request for each zero-based attempt. Returned requests are owned and disposed by the handler; returning the original request preserves caller ownership.

public Func<HttpRequestMessage, int, CancellationToken, ValueTask<HttpRequestMessage>>? RequestFactory { get; set; }

Property Value

Func<HttpRequestMessage, int, CancellationToken, ValueTask<HttpRequestMessage>>

Routing

Optional alternate-authority routing.

public HttpEndpointRoutingOptions? Routing { get; set; }

Property Value

HttpEndpointRoutingOptions