Class PreviewHttpRule

One method+path match rule and the PreviewHttpResponse it returns.

Inheritance
PreviewHttpRule
Namespace: BlazorToolkit.Previews
Assembly: BlazorToolkit.Previews.dll
Syntax
public sealed class PreviewHttpRule

Constructors

PreviewHttpRule()

Declaration
public PreviewHttpRule()

Properties

Method

HTTP method to match (e.g. "GET"), or null to match any method.

Declaration
public string? Method { get; set; }
Property Value
Type Description
string

PathPattern

Path to match against the request's absolute path. Exact match, or a simple wildcard (e.g. "/api/orders/"). A leading slash is optional; matching is case-insensitive.

Declaration
public string PathPattern { get; set; }
Property Value
Type Description
string

Response

The response this rule returns.

Declaration
public PreviewHttpResponse Response { get; set; }
Property Value
Type Description
PreviewHttpResponse