package sihl-type

  1. Overview
  2. Docs

Module Sihl_type.Http_routeSource

Sourcetype meth =
  1. | Get
  2. | Post
  3. | Put
  4. | Delete
  5. | Any
Sourcetype handler = Rock.Request.t -> Rock.Response.t Lwt.t
Sourcetype t = meth * string * handler
Sourceval get : string -> handler -> t
Sourceval post : string -> handler -> t
Sourceval put : string -> handler -> t
Sourceval delete : string -> handler -> t
Sourceval any : string -> handler -> t
Sourcetype router = {
  1. scope : string;
  2. routes : t list;
  3. middlewares : Rock.Middleware.t list;
}
Sourceval router : ?scope:string -> ?middlewares:Rock.Middleware.t list -> t list -> router
Sourceval prefix : string -> t -> t
Sourceval router_to_routes : router -> t list
Sourceval externalize_path : ?prefix:string -> string -> string