Docs · API reference · Motus.Abstractions

RouteFulfillOptions Class#

Options for fulfilling a route with a custom response.

public sealed record RouteFulfillOptions : System.IEquatable<Motus.Abstractions.RouteFulfillOptions>

Inheritance System.Object → RouteFulfillOptions

Implements System.IEquatable<RouteFulfillOptions>

Properties#

Body Property#

Response body as a string.

public string? Body { get; init; }

Property Value#

System.String

BodyBytes Property#

Response body as raw bytes.

public byte[]? BodyBytes { get; init; }

Property Value#

System.Byte[]

ContentType Property#

The Content-Type response header.

public string? ContentType { get; init; }

Property Value#

System.String

Headers Property#

Response headers.

public System.Collections.Generic.IDictionary<string,string>? Headers { get; init; }

Property Value#

System.Collections.Generic.IDictionary<System.String,System.String>

Path Property#

Path to a file to serve as the response body.

public string? Path { get; init; }

Property Value#

System.String

Status Property#

The HTTP status code to use.

public System.Nullable<int> Status { get; init; }

Property Value#

System.Nullable<System.Int32>