Vif.HandlerSourceThe user may want more precise dispatching than Vif can offer. In this case, if Vif cannot find any routes for a given request, handlers are used to possibly provide a response. Handlers therefore allow you to handle cases that cannot be described using Vif's URI and route system.
type ('c, 'value) t =
('c, string) Request.t ->
string ->
Server.t ->
'value ->
(Response.empty, Response.sent, unit) Response.t optionThe type of handlers.
The handler processes the request and can extract its content as a string. It also obtains the path/target specified in the request and, like typed handlers, has a value representing the server and the value given to run.