Module EzAPIServer

include EzServer
val server : ?⁠catch:(string -> exn -> string EzAPIServerUtils.Answer.t Lwt.t) -> (int * EzAPIServerUtils.server_kind) list -> unit Lwt.t
val set_debug : unit -> unit
include EzAPIServerUtils
module StringMap = EzAPIServerUtils.StringMap
module Timings = EzAPIServerUtils.Timings
module Directory = EzAPIServerUtils.Directory
module Answer = EzAPIServerUtils.Answer
module Req = EzAPI.Req
module File = EzAPIServerUtils.File
module GMTime = EzAPIServerUtils.GMTime
type server_kind =
| API of Directory.t
| Root of string * string option
type server = {
server_port : int;
server_kind : server_kind;
}
val return : ?⁠code:int -> ?⁠headers:(string * string) list -> 'a -> 'a Answer.t Lwt.t
val return_ok : ?⁠code:int -> ?⁠headers:(string * string) list -> 'a -> ('a'b) Stdlib.result Answer.t Lwt.t
val return_error : ?⁠content:'a -> ?⁠headers:(string * string) list -> int -> ('b'a option) Stdlib.result Answer.t Lwt.t
val verbose : int Stdlib.ref
val set_verbose : int -> unit
val pp_time : unit -> string
val debug : ?⁠v:int -> ('a, unit, string, unit) Stdlib.format4 -> 'a
val debugf : ?⁠v:int -> (unit -> unit) -> unit
val empty : 'a Directory.directory
val register_res : ('a'b'c'd[< EzAPI.Security.scheme ] as 'e) EzAPI.service -> ('a -> 'e list -> 'b -> ('c'd) Stdlib.result Answer.t Lwt.t) -> Directory.t -> (Directory.tDirectory.Step.t list * Directory.conflict) Stdlib.result
val register_ws_res : ('a'b'c'd[< EzAPI.Security.scheme ] as 'e) EzAPI.service -> react:('a -> 'e list -> 'b -> ('c'd) Stdlib.result Lwt.t) -> bg:('a -> 'e list -> (('c'd) Stdlib.result -> unit) -> unit Lwt.t) -> ?⁠onclose:('a -> unit Lwt.t) -> ?⁠step:float -> Directory.t -> (Directory.tDirectory.Step.t list * Directory.conflict) Stdlib.result
exception Conflict of Directory.Step.t list * Directory.conflict
val register : ('a'b'c'd[< EzAPI.Security.scheme ] as 'e) EzAPI.service -> ('a -> 'e list -> 'b -> ('c'd) Stdlib.result Answer.t Lwt.t) -> Directory.t -> Directory.t
val register_ws : ('a'b'c'd[< EzAPI.Security.scheme ] as 'e) EzAPI.service -> ?⁠onclose:('a -> unit Lwt.t) -> ?⁠step:float -> react:('a -> 'e list -> 'b -> ('c'd) Stdlib.result Lwt.t) -> bg:('a -> 'e list -> (('c'd) Stdlib.result -> unit) -> unit Lwt.t) -> Directory.t -> Directory.t
module Legacy = EzAPIServerUtils.Legacy
val handle : ?⁠meth:[< `DELETE | `GET | `HEAD | `OPTIONS | `PATCH | `POST | `PUT GET OPTIONS ] -> ?⁠content_type:string -> ?⁠ws:(?⁠onclose:(unit -> unit Lwt.t) -> ?⁠step:float -> react:(string -> (Directory.ws_frameDirectory.handler_error) Stdlib.result Lwt.t) -> bg:(((Directory.ws_frameDirectory.handler_error) Stdlib.result -> unit) -> unit Lwt.t) -> Uuidm.t -> 'a Lwt.t) -> server_kind -> EzAPI.Req.t -> string list -> string -> [> `http of string Answer.t | `ws of 'a ] Lwt.t
val access_control_headers : (string * string) list