IResponseProcessor
Pennington.Infrastructure
Processes HTTP response bodies for a specific concern.
Properties
Orderint- Execution order; lower values run earlier in the response pipeline.
Methods
ProcessAsync
#public Task<string> ProcessAsync(string responseBody, HttpContext context)
Transforms responseBody and returns the processed body.
Parameters
responseBodystringcontextHttpContext
Returns
Task<string>ShouldProcess
#public bool ShouldProcess(HttpContext context)
Returns true when this processor should run for the current request.
Parameters
contextHttpContext
Returns
boolPennington.Infrastructure.IResponseProcessor
namespace Pennington.Infrastructure;
/// Processes HTTP response bodies for a specific concern.
public interface IResponseProcessor
{
/// Execution order; lower values run earlier in the response pipeline.
public int Order { get; }
/// Transforms responseBody and returns the processed body.
public Task<string> ProcessAsync(string responseBody, HttpContext context)
;
/// Returns true when this processor should run for the current request.
public bool ShouldProcess(HttpContext context)
;
}