package cohttp

  1. Overview
  2. Docs
include BASE
type +'a io
type 'a with_context
type body
val map_context : 'a with_context -> ('a -> 'b) -> 'b with_context
val call : (?headers:Http.Header.t -> ?body:body -> ?chunked:bool -> Http.Method.t -> Uri.t -> (Http.Response.t * body) io) with_context

call ?headers ?body ?chunked meth uri

  • returns

    (response, response_body) Consume response_body in a timely fashion. Please see call about how and why.

  • parameter chunked

    use chunked encoding if true. The default is false for compatibility reasons.

val head : (?headers:Http.Header.t -> Uri.t -> Http.Response.t io) with_context
val get : (?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
val delete : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
val post : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
val put : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
val patch : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
OCaml

Innovation. Community. Security.