package irmin-http

  1. Overview
  2. Docs

Parameters

module P : Sock

Signature

include module type of Cohttp_lwt_unix.Client
include Cohttp_lwt.S.Client with type ctx = Cohttp_lwt_unix__.Net.ctx
type 'a io = 'a Lwt.t
type !'a with_context = ?ctx:ctx -> 'a
type body = Cohttp_lwt__.Body.t
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
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
val set_cache : Cohttp_lwt__S.call -> unit
val post_form : ?ctx:ctx -> ?headers:Http.Header.t -> params:(string * string list) list -> Uri.t -> (Http.Response.t * Cohttp_lwt__.Body.t) Lwt.t
val callv : ?ctx:ctx -> Uri.t -> (Http.Request.t * Cohttp_lwt__.Body.t) Lwt_stream.t -> (Http.Response.t * Cohttp_lwt__.Body.t) Lwt_stream.t Lwt.t
val custom_ctx : ?ctx:Conduit_lwt_unix.ctx -> ?resolver:Resolver_lwt.t -> unit -> Cohttp_lwt_unix.Net.ctx

custom_ctx ?ctx ?resolver () will return a context that is the same as the default_ctx, but with either the connection handling or resolution module overridden with ctx or resolver respectively. This is useful to supply a Conduit_lwt_unix.ctx with a custom source network interface, or a Resolver_lwt.t with a different name resolution strategy (for instance to override a hostname to point it to a Unix domain socket).

val ctx : unit -> ctx option
OCaml

Innovation. Community. Security.