Module Tiny_httpd_server.Middleware
type handler= byte_stream Request.t -> resp:(Response.t -> unit) -> unitHandlers are functions returning a response to a request. The response can be delayed, hence the use of a continuation as the
respparameter.
type t= handler -> handlerA middleware is a handler transformation.
It takes the existing handler
h, and returns a new one which, given a query, modify it or log it before passing it toh, or fail. It can also log or modify or drop the response.
val nil : tTrivial middleware that does nothing.