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
statusCodeint
Properties
ActionScope
public override FilterScope ActionScope { get; }
Property Value
DefaultDescription
public override string DefaultDescription { get; }
Property Value
StatusCode
The HTTP status code to return (e.g., 403, 404, 502).
public int StatusCode { get; set; }
Property Value
Methods
GetExamples()
public override IEnumerable<ActionExample> GetExamples()
Returns
InternalAlter(ExchangeContext, Exchange?, Connection?, FilterScope, BreakPointManager)
public override ValueTask InternalAlter(ExchangeContext context, Exchange? exchange, Connection? connection, FilterScope scope, BreakPointManager breakPointManager)
Parameters
contextExchangeContextexchangeExchangeconnectionConnectionscopeFilterScopebreakPointManagerBreakPointManager