handy_httpd.handlers.filtered_handler

This module contains a handler that applies filters to a request context before (or after) handing it off to the proper handler.

Members

Aliases

HttpRequestFilterFunction
alias HttpRequestFilterFunction = void function(ref HttpRequestContext, FilterChain)

An alias for a function that can be used as a request filter.

Classes

FilterChain
class FilterChain

An ordered, singly-linked list of filters to apply to a request context.

FilteredRequestHandler
class FilteredRequestHandler

A request handler that can apply a series of filters before and after a request is ultimately handled by a handler. The filtered request handler prepares a filter chain that looks something like this:

Functions

toFilter
HttpRequestFilter toFilter(HttpRequestFilterFunction fn)

Constructs a new request filter object from the given function.

Interfaces

HttpRequestFilter
interface HttpRequestFilter

A filter that can be applied to a request context. If the filter determines that it's okay to continue processing the request, it should call filterChain.doFilter(ctx); to continue the chain. If the chain is not continued, request processing ends at this filter, and the current response is flushed to the client.