package cohttp-lwt

  1. Overview
  2. Docs

Module Client.MakeSource

Parameters

Signature

In most cases you should use the more specific helper calls in the interface rather than invoke this function directly. See head, get and post for some examples.

include Cohttp.Generic.Client.S with type 'a io = 'a Lwt.t and type body = Body.t and type 'a with_context = ?ctx:ctx -> 'a
Sourcetype 'a io = 'a Lwt.t
Sourcetype 'a with_context = ?ctx:ctx -> 'a
Sourcetype body = Body.t
Sourceval map_context : 'a with_context -> ('a -> 'b) -> 'b with_context
Sourceval 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.

Sourceval delete : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
Sourceval post : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
Sourceval put : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
Sourceval patch : (?body:body -> ?chunked:bool -> ?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
Sourceval set_cache : S.call -> unit

Provide a function used to process requests. Please see call. The provided function is only used when no ctx argument is passed to the convenience functions below.

Sourceval post_form : ?ctx:ctx -> ?headers:Http.Header.t -> params:(string * string list) list -> Uri.t -> (Http.Response.t * Body.t) Lwt.t
  • deprecated

    use moduleCohttp_lwt.Connection instead.

OCaml

Innovation. Community. Security.