Table of Contents

Class RejectWithStatusCodeAction

Namespace
Fluxzy.Rules.Actions.HighLevelActions
Assembly
Fluxzy.Core.dll

Reject the request with a custom HTTP status code.

[ActionMetadata("Block the request and return a custom HTTP error response. Allows specifying the status code (e.g., 403, 404, 502) to return to the client. The response body will contain the standard reason phrase for the status code.")]
public class RejectWithStatusCodeAction : Action
Inheritance
RejectWithStatusCodeAction
Inherited Members

Constructors

RejectWithStatusCodeAction()

[JsonConstructor]
public RejectWithStatusCodeAction()

RejectWithStatusCodeAction(int)

public RejectWithStatusCodeAction(int statusCode)

Parameters

statusCode int

Properties

ActionScope

public override FilterScope ActionScope { get; }

Property Value

FilterScope

DefaultDescription

public override string DefaultDescription { get; }

Property Value

string

StatusCode

The HTTP status code to return (e.g., 403, 404, 502).

public int StatusCode { get; set; }

Property Value

int

Methods

GetExamples()

public override IEnumerable<ActionExample> GetExamples()

Returns

IEnumerable<ActionExample>

InternalAlter(ExchangeContext, Exchange?, Connection?, FilterScope, BreakPointManager)

public override ValueTask InternalAlter(ExchangeContext context, Exchange? exchange, Connection? connection, FilterScope scope, BreakPointManager breakPointManager)

Parameters

context ExchangeContext
exchange Exchange
connection Connection
scope FilterScope
breakPointManager BreakPointManager

Returns

ValueTask