import { createHandler } from "https://deno.land/x/composium@v0.0.7/mod.ts";
A curried function which takes a Context
class, tryHandlers
,
catchHandlers
and finallyHandlers
and returns in the end a Handler
function which can be passed to listen
. You can pass an initial state
object optionally. It also handles the request's method HEAD
appropriately
and sets the X-Response-Time
header.
createHandler(Ctx)(tryHandler)(catchHandler)(finallyHandler)
Type Parameters
C extends Context