beforeRouteRequest could be a fn that takes something like Route.t -> Req.t -> Res.t -> (Route.t -> Req.t -> Res.t -> (Route.t * Req.t * Res.t) Lwt.t) -> (Route.t * Req.t * Res.t) Lwt.t) meaning it's last arg is the routeRequest function, which should be called to continue the lifecycle of the request.
maybe afterRouteRequest? I'm not as sure about that one
add hooks for middleware
maybe
beforeRouteRequest
?beforeRouteRequest
could be a fn that takes something likeRoute.t -> Req.t -> Res.t -> (Route.t -> Req.t -> Res.t -> (Route.t * Req.t * Res.t) Lwt.t) -> (Route.t * Req.t * Res.t) Lwt.t)
meaning it's last arg is therouteRequest
function, which should be called to continue the lifecycle of the request.maybe
afterRouteRequest
? I'm not as sure about that one