irmin-http
HTTP client and server for Irmin
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package irmin-http
-
irmin-http
-
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library irmin-http
include Cohttp_lwt.S.Client
val set_cache : Cohttp_lwt.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.
val call :
?ctx:ctx ->
?headers:Http.Header.t ->
?body:Cohttp_lwt.Body.t ->
?chunked:bool ->
Http.Method.t ->
Uri.t ->
(Http.Response.t * Cohttp_lwt.Body.t) Lwt.t
call ?ctx ?headers ?body ?chunked meth uri
- returns
(response, response_body)
Consumeresponse_body
in a timely fashion. Please seecall
about how and why.
- parameter chunked
use chunked encoding if
true
. The default isfalse
for compatibility reasons.
- parameter ctx
If provided, no connection cache is used, but
Connection_cache
.Make_no_cache.create is used to resolve uri and create a dedicated connection withctx
.In most cases you should use the more specific helper calls in the interface rather than invoke this function directly. See
head
,get
andpost
for some examples.
val head : ?ctx:ctx -> ?headers:Http.Header.t -> Uri.t -> Http.Response.t Lwt.t
val get :
?ctx:ctx ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * Cohttp_lwt.Body.t) Lwt.t
val delete :
?ctx:ctx ->
?body:Cohttp_lwt.Body.t ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * Cohttp_lwt.Body.t) Lwt.t
val post :
?ctx:ctx ->
?body:Cohttp_lwt.Body.t ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * Cohttp_lwt.Body.t) Lwt.t
val put :
?ctx:ctx ->
?body:Cohttp_lwt.Body.t ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * Cohttp_lwt.Body.t) Lwt.t
val patch :
?ctx:ctx ->
?body:Cohttp_lwt.Body.t ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * Cohttp_lwt.Body.t) Lwt.t
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
- deprecated
use
moduleCohttp_lwt
.Connection instead.
val ctx : unit -> ctx option
ON THIS PAGE
No table of contents