Source file contract_http.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
type meth =
| Get
| Post
| Put
| Delete
| Any
type handler = Rock.Request.t -> Rock.Response.t Lwt.t
type t = meth * string * handler
type router =
{ scope : string
; routes : t list
; middlewares : Rock.Middleware.t list
}
let name = "http"
module type Sig = sig
val register : ?routers:router list -> unit -> Core_container.Service.t
include Core_container.Service.Sig
end