Module Request.Handler

Internal, used by Snark0.

type single

A single response handler. Create using create_single.

type t

A stack of handlers which are run on any requests that are raised.

val fail : t
val create_single : ( request -> response ) -> single
val push : t -> single -> t

Add a single handler.

val run : t -> string list -> 'a req -> 'a

Run the handler on a request. Throws an error on failure.