This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

IResponseProcessor Pennington.Infrastructure

Processes HTTP response bodies for a specific concern.

Properties

Order int
Execution order; lower values run earlier in the response pipeline.

Methods

ProcessAsync

#
Task<string> ProcessAsync(string responseBody, HttpContext context);

Transforms responseBody and returns the processed body.

Parameters

responseBody string
context HttpContext

Returns

Task<string>

ShouldProcess

#
bool ShouldProcess(HttpContext context);

Returns true when this processor should run for the current request.

Parameters

context HttpContext

Returns

bool

Pennington.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.
    
int Order { get; }
/// Transforms responseBody and returns the processed body.
Task<string> ProcessAsync(string responseBody, HttpContext context);
/// Returns true when this processor should run for the current request.
bool ShouldProcess(HttpContext context);
}