Interface IResponseInterceptor
interface for defining a response interceptor to be executed before the main endpoint handler executes
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public interface IResponseInterceptor
Methods
InterceptResponseAsync(object, int, HttpContext, IReadOnlyCollection<ValidationFailure>, CancellationToken)
implement this method to intercept the http response with the use of SendInterceptedAsync() method.
Declaration
Task InterceptResponseAsync(object response, int statusCode, HttpContext ctx, IReadOnlyCollection<ValidationFailure> failures, CancellationToken ct)
Parameters
Type | Name | Description |
---|---|---|
object | response | the response object |
int | statusCode | |
HttpContext | ctx | the http context of the current request |
IReadOnlyCollection<ValidationFailure> | failures | the collection of validation failures for the endpoint |
CancellationToken | ct | cancellation token |
Returns
Type | Description |
---|---|
Task |