diff --git a/dev/ezcurl-lwt/Ezcurl_lwt/index.html b/dev/ezcurl-lwt/Ezcurl_lwt/index.html index 1f15a8f..8664d24 100644 --- a/dev/ezcurl-lwt/Ezcurl_lwt/index.html +++ b/dev/ezcurl-lwt/Ezcurl_lwt/index.html @@ -1,2 +1,2 @@ -Ezcurl_lwt (ezcurl-lwt.Ezcurl_lwt)

Module Ezcurl_lwt

include Ezcurl_core
module Config = Ezcurl_core.Config
type t = Curl.t
val make : ?⁠set_opts:(t -> unit) -> unit -> t
val delete : t -> unit
val with_client : ?⁠set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup

type response_info = {
ri_response_time : float;
ri_redirect_count : int;
}
val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = {
code : int;
headers : (string * string) list;
body : string;
info : response_info;
}
val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth =
| GET
| POST of Curl.curlHTTPPost list
| PUT
| DELETE
| HEAD
| CONNECT
| OPTIONS
| TRACE
| PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = sig ... end
module type S = sig ... end
module Make = Ezcurl_core.Make
include sig ... end
type 'a io = 'a Lwt.t
val http : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠content:string -> ?⁠headers:(string * string) list -> url:string -> meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val get : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val put : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> url:string -> content:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val post : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> params:Curl.curlHTTPPost list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
\ No newline at end of file +Ezcurl_lwt (ezcurl-lwt.Ezcurl_lwt)

Module Ezcurl_lwt

include Ezcurl_core
module Config = Ezcurl_core.Config
type t = Curl.t
val make : ?⁠set_opts:(t -> unit) -> unit -> t
val delete : t -> unit
val with_client : ?⁠set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup

type response_info = {
ri_response_time : float;
ri_redirect_count : int;
}
val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = {
code : int;
headers : (string * string) list;
body : string;
info : response_info;
}
val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth =
| GET
| POST of Curl.curlHTTPPost list
| PUT
| DELETE
| HEAD
| CONNECT
| OPTIONS
| TRACE
| PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = sig ... end
module type S = sig ... end
module Make = Ezcurl_core.Make
include sig ... end
type 'a io = 'a Lwt.t
val http : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> ?⁠headers:(string * string) list -> url:string -> meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val get : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val put : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val post : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
\ No newline at end of file diff --git a/dev/ezcurl-lwt/Ezcurl_lwt/module-type-S/index.html b/dev/ezcurl-lwt/Ezcurl_lwt/module-type-S/index.html index 9b1bcf7..eebdebf 100644 --- a/dev/ezcurl-lwt/Ezcurl_lwt/module-type-S/index.html +++ b/dev/ezcurl-lwt/Ezcurl_lwt/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ezcurl-lwt.Ezcurl_lwt.S)

Module type Ezcurl_lwt.S

Main Signature

type 'a io
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:string -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file +S (ezcurl-lwt.Ezcurl_lwt.S)

Module type Ezcurl_lwt.S

Main Signature

type 'a io
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body, either a `String s to write a single string, or `Write f where f is a callback that is called on a buffer b with len n (as in f b n) and returns how many bytes it wrote in the buffer b starting at index 0 (at most n bytes). It must return 0 when the content is entirely written, and not before.

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl/index.html b/dev/ezcurl/Ezcurl/index.html index d9f8dc0..26129ed 100644 --- a/dev/ezcurl/Ezcurl/index.html +++ b/dev/ezcurl/Ezcurl/index.html @@ -1,2 +1,2 @@ -Ezcurl (ezcurl.Ezcurl)

Module Ezcurl

Synchronous API

include Ezcurl_core
module Config = Ezcurl_core.Config
type t = Curl.t
val make : ?⁠set_opts:(t -> unit) -> unit -> t
val delete : t -> unit
val with_client : ?⁠set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup

type response_info = {
ri_response_time : float;
ri_redirect_count : int;
}
val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = {
code : int;
headers : (string * string) list;
body : string;
info : response_info;
}
val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth =
| GET
| POST of Curl.curlHTTPPost list
| PUT
| DELETE
| HEAD
| CONNECT
| OPTIONS
| TRACE
| PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = sig ... end
module type S = sig ... end
module Make = Ezcurl_core.Make
include sig ... end
type 'a io = 'a
val http : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠content:string -> ?⁠headers:(string * string) list -> url:string -> meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val get : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val put : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> url:string -> content:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val post : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> params:Curl.curlHTTPPost list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
\ No newline at end of file +Ezcurl (ezcurl.Ezcurl)

Module Ezcurl

Synchronous API

include Ezcurl_core
module Config = Ezcurl_core.Config
type t = Curl.t
val make : ?⁠set_opts:(t -> unit) -> unit -> t
val delete : t -> unit
val with_client : ?⁠set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup

type response_info = {
ri_response_time : float;
ri_redirect_count : int;
}
val pp_response_info : Stdlib.Format.formatter -> response_info -> unit
val string_of_response_info : response_info -> string
type response = {
code : int;
headers : (string * string) list;
body : string;
info : response_info;
}
val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth =
| GET
| POST of Curl.curlHTTPPost list
| PUT
| DELETE
| HEAD
| CONNECT
| OPTIONS
| TRACE
| PATCH

The HTTP method to use

val pp_meth : Stdlib.Format.formatter -> meth -> unit
val string_of_meth : meth -> string
module type IO = sig ... end
module type S = sig ... end
module Make = Ezcurl_core.Make
include sig ... end
type 'a io = 'a
val http : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> ?⁠headers:(string * string) list -> url:string -> meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val get : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val put : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
val post : ?⁠tries:int -> ?⁠client:Ezcurl_core.t -> ?⁠config:Ezcurl_core.Config.t -> ?⁠headers:(string * string) list -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io
\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl/module-type-S/index.html b/dev/ezcurl/Ezcurl/module-type-S/index.html index b244ff3..36de424 100644 --- a/dev/ezcurl/Ezcurl/module-type-S/index.html +++ b/dev/ezcurl/Ezcurl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ezcurl.Ezcurl.S)

Module type Ezcurl.S

Main Signature

type 'a io
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:string -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file +S (ezcurl.Ezcurl.S)

Module type Ezcurl.S

Main Signature

type 'a io
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body, either a `String s to write a single string, or `Write f where f is a callback that is called on a buffer b with len n (as in f b n) and returns how many bytes it wrote in the buffer b starting at index 0 (at most n bytes). It must return 0 when the content is entirely written, and not before.

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl_core/Make/index.html b/dev/ezcurl/Ezcurl_core/Make/index.html index 2991958..afe9242 100644 --- a/dev/ezcurl/Ezcurl_core/Make/index.html +++ b/dev/ezcurl/Ezcurl_core/Make/index.html @@ -1,2 +1,2 @@ -Make (ezcurl.Ezcurl_core.Make)

Module Ezcurl_core.Make

Parameters

Signature

type 'a io = 'a IO.t
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:string -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file +Make (ezcurl.Ezcurl_core.Make)

Module Ezcurl_core.Make

Parameters

Signature

type 'a io = 'a IO.t
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body, either a `String s to write a single string, or `Write f where f is a callback that is called on a buffer b with len n (as in f b n) and returns how many bytes it wrote in the buffer b starting at index 0 (at most n bytes). It must return 0 when the content is entirely written, and not before.

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl_core/module-type-S/index.html b/dev/ezcurl/Ezcurl_core/module-type-S/index.html index a29e456..053eb8f 100644 --- a/dev/ezcurl/Ezcurl_core/module-type-S/index.html +++ b/dev/ezcurl/Ezcurl_core/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ezcurl.Ezcurl_core.S)

Module type Ezcurl_core.S

Main Signature

type 'a io
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:string -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file +S (ezcurl.Ezcurl_core.S)

Module type Ezcurl_core.S

Main Signature

type 'a io
val http : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> ?⁠headers:(string * string) list -> url:string -> meth:meth -> unit -> (response, Curl.curlCode * string) Stdlib.result io

General purpose HTTP call via cURL.

parameter url

the URL to query

parameter meth

which method to use (see meth)

parameter tries

how many times to retry in case of CURLE_AGAIN code

parameter client

a client to reuse (instead of allocating a new one)

parameter range

an optional byte range to fetch (either to get large pages by chunks, or to resume an interrupted download).

parameter config

configuration to set

parameter content

the content to send as the query's body, either a `String s to write a single string, or `Write f where f is a callback that is called on a buffer b with len n (as in f b n) and returns how many bytes it wrote in the buffer b starting at index 0 (at most n bytes). It must return 0 when the content is entirely written, and not before.

parameter headers

headers of the query

val get : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠range:string -> ?⁠headers:(string * string) list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:GET See http for more info.

val put : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:PUT See http for more info.

val post : ?⁠tries:int -> ?⁠client:t -> ?⁠config:Config.t -> ?⁠headers:(string * string) list -> ?⁠content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (response, Curl.curlCode * string) Stdlib.result io

Shortcut for http ~meth:(POST params) See http for more info.

\ No newline at end of file