Module Kurl.Allow

Method constraints.

type 'a t = Webs.Http.meth * 'a

The type for method constraints.

val meths : 'a t list -> bare -> ('aWebs.Resp.t) Stdlib.result

meths ms u is:

  • Ok (Bare.meth u) if List.mem (Bare.meth u, Bare.meth u) ms
  • Error _ with a 405 not allowed response otherwise.

Constraints

val connect : [> `CONNECT ] t
val delete : [> `DELETE ] t
val get : [> `GET ] t
val head : [> `HEAD ] t
val options : [> `OPTIONS ] t
val other : string -> 'a -> 'a t
val patch : [> `PATCH ] t
val post : [> `POST ] t
val put : [> `PUT ] t
val trace : [> `TRACE ] t