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, Int32, 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 |
---|---|---|
System.Object | response | the response object |
System.Int32 | statusCode | |
Microsoft.AspNetCore.Http.HttpContext | ctx | the http context of the current request |
System.Collections.Generic.IReadOnlyCollection<FluentValidation.Results.ValidationFailure> | failures | the collection of validation failures for the endpoint |
System.Threading.CancellationToken | ct | cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |