diff --git a/dev/ezcurl-lwt/Ezcurl_lwt/index.html b/dev/ezcurl-lwt/Ezcurl_lwt/index.html index 8664d24..80c2f03 100644 --- a/dev/ezcurl-lwt/Ezcurl_lwt/index.html +++ b/dev/ezcurl-lwt/Ezcurl_lwt/index.html @@ -1,2 +1,11 @@ -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 +Ezcurl_lwt (ezcurl-lwt.Ezcurl_lwt)

Module Ezcurl_lwt

include module type of struct include Ezcurl_core end
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 = Ezcurl_core.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 = Ezcurl_core.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 = Ezcurl_core.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 = Ezcurl_core.IO
module type S = Ezcurl_core.S
module Make = Ezcurl_core.Make
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.responseCurl.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.responseCurl.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.responseCurl.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.responseCurl.curlCode * string) Stdlib.result io
\ No newline at end of file diff --git a/dev/ezcurl-lwt/Ezcurl_lwt/module-type-IO/index.html b/dev/ezcurl-lwt/Ezcurl_lwt/module-type-IO/index.html deleted file mode 100644 index 63b5f3f..0000000 --- a/dev/ezcurl-lwt/Ezcurl_lwt/module-type-IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (ezcurl-lwt.Ezcurl_lwt.IO)

Module type Ezcurl_lwt.IO

Underlying IO Monad

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ 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 deleted file mode 100644 index eebdebf..0000000 --- a/dev/ezcurl-lwt/Ezcurl_lwt/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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-lwt/index.html b/dev/ezcurl-lwt/index.html index 142df28..3e38256 100644 --- a/dev/ezcurl-lwt/index.html +++ b/dev/ezcurl-lwt/index.html @@ -1,2 +1,2 @@ -index (ezcurl-lwt.index)

ezcurl-lwt index

Library ezcurl-lwt

The entry point of this library is the module: Ezcurl_lwt.

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

ezcurl-lwt index

Library ezcurl-lwt

The entry point of this library is the module: Ezcurl_lwt.

\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl/index.html b/dev/ezcurl/Ezcurl/index.html index 26129ed..21e01d7 100644 --- a/dev/ezcurl/Ezcurl/index.html +++ b/dev/ezcurl/Ezcurl/index.html @@ -1,2 +1,11 @@ -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 +Ezcurl (ezcurl.Ezcurl)

Module Ezcurl

Synchronous API

include module type of struct include Ezcurl_core end
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 = Ezcurl_core.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 = Ezcurl_core.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 = Ezcurl_core.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 = Ezcurl_core.IO
module type S = Ezcurl_core.S
module Make = Ezcurl_core.Make
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.responseCurl.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.responseCurl.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.responseCurl.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.responseCurl.curlCode * string) Stdlib.result io
\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl/module-type-IO/index.html b/dev/ezcurl/Ezcurl/module-type-IO/index.html deleted file mode 100644 index 1d99360..0000000 --- a/dev/ezcurl/Ezcurl/module-type-IO/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -IO (ezcurl.Ezcurl.IO)

Module type Ezcurl.IO

Underlying IO Monad

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ 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 deleted file mode 100644 index 36de424..0000000 --- a/dev/ezcurl/Ezcurl/module-type-S/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -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/Config/index.html b/dev/ezcurl/Ezcurl_core/Config/index.html index 4ecf354..8ffe6f6 100644 --- a/dev/ezcurl/Ezcurl_core/Config/index.html +++ b/dev/ezcurl/Ezcurl_core/Config/index.html @@ -1,2 +1,2 @@ -Config (ezcurl.Ezcurl_core.Config)

Module Ezcurl_core.Config

type t
val default : t
val verbose : bool -> t -> t
val authmethod : Curl.curlAuth list -> t -> t
val max_redirects : int -> t -> t
val follow_location : bool -> t -> t
val username : string -> t -> t
val password : string -> t -> t
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string
\ No newline at end of file +Config (ezcurl.Ezcurl_core.Config)

Module Ezcurl_core.Config

type t
val default : t
val verbose : bool -> t -> t
val authmethod : Curl.curlAuth list -> t -> t
val max_redirects : int -> t -> t
val follow_location : bool -> t -> t
val username : string -> t -> t
val password : string -> t -> t
val pp : Stdlib.Format.formatter -> t -> unit
val to_string : t -> string
\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html b/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html index c5a6092..b0e8248 100644 --- a/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html +++ b/dev/ezcurl/Ezcurl_core/Make/argument-1-IO/index.html @@ -1,2 +1,2 @@ -1-IO (ezcurl.Ezcurl_core.Make.1-IO)

Parameter Make.1-IO

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ No newline at end of file +IO (ezcurl.Ezcurl_core.Make.1-IO)

Parameter Make.1-IO

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ 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 afe9242..4e7f389 100644 --- a/dev/ezcurl/Ezcurl_core/Make/index.html +++ b/dev/ezcurl/Ezcurl_core/Make/index.html @@ -1,2 +1,11 @@ -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 +Make (ezcurl.Ezcurl_core.Make)

Module Ezcurl_core.Make

Parameters

module IO : IO

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 -> (responseCurl.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 -> (responseCurl.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 -> (responseCurl.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 -> (responseCurl.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/index.html b/dev/ezcurl/Ezcurl_core/index.html index b3e0bb3..2a73676 100644 --- a/dev/ezcurl/Ezcurl_core/index.html +++ b/dev/ezcurl/Ezcurl_core/index.html @@ -1,2 +1,2 @@ -Ezcurl_core (ezcurl.Ezcurl_core)

Module Ezcurl_core

Core signatures and implementation

module Config : sig ... end
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 : functor (IO : IO) -> S with type 'a io = 'a IO.t
\ No newline at end of file +Ezcurl_core (ezcurl.Ezcurl_core)

Module Ezcurl_core

Core signatures and implementation

module Config : sig ... end
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 (IO : IO) : S with type 'a io = 'a IO.t
\ No newline at end of file diff --git a/dev/ezcurl/Ezcurl_core/module-type-IO/index.html b/dev/ezcurl/Ezcurl_core/module-type-IO/index.html index 717f115..7922e66 100644 --- a/dev/ezcurl/Ezcurl_core/module-type-IO/index.html +++ b/dev/ezcurl/Ezcurl_core/module-type-IO/index.html @@ -1,2 +1,2 @@ -IO (ezcurl.Ezcurl_core.IO)

Module type Ezcurl_core.IO

Underlying IO Monad

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ No newline at end of file +IO (ezcurl.Ezcurl_core.IO)

Module type Ezcurl_core.IO

Underlying IO Monad

type 'a t
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val fail : exn -> 'a t
val perform : Curl.t -> Curl.curlCode t
\ 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 053eb8f..0bc643d 100644 --- a/dev/ezcurl/Ezcurl_core/module-type-S/index.html +++ b/dev/ezcurl/Ezcurl_core/module-type-S/index.html @@ -1,2 +1,11 @@ -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 +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 -> (responseCurl.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 -> (responseCurl.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 -> (responseCurl.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 -> (responseCurl.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/index.html b/dev/ezcurl/index.html index 5571e30..c5a3bbd 100644 --- a/dev/ezcurl/index.html +++ b/dev/ezcurl/index.html @@ -1,2 +1,2 @@ -index (ezcurl.index)

ezcurl index

Library ezcurl

The entry point of this library is the module: Ezcurl.

Library ezcurl.core

The entry point of this library is the module: Ezcurl_core.

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

ezcurl index

Library ezcurl

The entry point of this library is the module: Ezcurl.

Library ezcurl.core

The entry point of this library is the module: Ezcurl_core.

\ No newline at end of file diff --git a/dev/odoc.css b/dev/odoc.css index 65c6458..31951eb 100644 --- a/dev/odoc.css +++ b/dev/odoc.css @@ -1,13 +1,125 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 1.5.3 */ + odoc 2.0.0 */ /* Fonts */ @import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); @import url('https://fonts.googleapis.com/css?family=Noticia+Text:400,400i,700'); @import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,500,500i,600,600i,700,700i'); +:root, +.light:root { + --main-background: #FFFFFF; + + --color: #333333; + --link-color: #2C94BD; + --anchor-hover: #555; + --anchor-color: #d5d5d5; + --xref-shadow: #cc6666; + --header-shadow: #ddd; + --by-name-version-color: #aaa; + --by-name-nav-link-color: #222; + --target-background: rgba(187, 239, 253, 0.3); + --target-shadow: rgba(187, 239, 253, 0.8); + --pre-border-color: #eee; + --code-background: #f6f8fa; + + --li-code-background: #f6f8fa; + --li-code-color: #0d2b3e; + --toc-color: #1F2D3D; + --toc-before-color: #777; + --toc-background: #f6f8fa; + --toc-list-border: #ccc; + + --spec-summary-border-color: #5c9cf5; + --spec-summary-background: var(--code-background); + --spec-summary-hover-background: #ebeff2; + --spec-details-after-background: rgba(0, 4, 15, 0.05); + --spec-details-after-shadow: rgba(204, 204, 204, 0.53); +} + +.dark:root { + --main-background: #202020; + --code-background: #222; + --line-numbers-background: rgba(0, 0, 0, 0.125); + --navbar-background: #202020; + + --color: #bebebe; + --dirname-color: #666; + --underline-color: #444; + --visited-color: #002800; + --visited-number-color: #252; + --unvisited-color: #380000; + --unvisited-number-color: #622; + --somevisited-color: #303000; + --highlight-color: #303e3f; + --line-number-color: rgba(230, 230, 230, 0.3); + --unvisited-margin-color: #622; + --border: #333; + --navbar-border: #333; + --code-color: #ccc; + + --li-code-background: #373737; + --li-code-color: #999; + --toc-color: #777; + --toc-background: #252525; + + --hljs-link: #999; + --hljs-keyword: #cda869; + --hljs-regexp: #f9ee98; + --hljs-title: #dcdcaa; + --hljs-type: #ac885b; + --hljs-meta: #82aaff; + --hljs-variable: #cf6a4c; +} + +@media (prefers-color-scheme: dark) { + :root { + --main-background: #202020; + --code-background: #333; + --line-numbers-background: rgba(0, 0, 0, 0.125); + --navbar-background: #202020; + + --meter-unvisited-color: #622; + --meter-visited-color: #252; + --meter-separator-color: black; + + --color: #bebebe; + --dirname-color: #666; + --underline-color: #444; + --visited-color: #002800; + --visited-number-color: #252; + --unvisited-color: #380000; + --unvisited-number-color: #622; + --somevisited-color: #303000; + --highlight-color: #303e3f; + --line-number-color: rgba(230, 230, 230, 0.3); + --unvisited-margin-color: #622; + --border: #333; + --navbar-border: #333; + --code-color: #ccc; + --by-name-nav-link-color: var(--color); + + --li-code-background: #373737; + --li-code-color: #999; + --toc-color: #777; + --toc-before-color: #777; + --toc-background: #252525; + --toc-list-border: #ccc; + --spec-summary-hover-background: #ebeff2; + --spec-details-after-background: rgba(0, 4, 15, 0.05); + --spec-details-after-shadow: rgba(204, 204, 204, 0.53); + + --hljs-link: #999; + --hljs-keyword: #cda869; + --hljs-regexp: #f9ee98; + --hljs-title: #dcdcaa; + --hljs-type: #ac885b; + --hljs-meta: #82aaff; + --hljs-variable: #cf6a4c; + } +} /* Reset a few things. */ @@ -15,13 +127,9 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq margin: 0; padding: 0; border: 0; - font-size: inherit; font: inherit; - line-height: inherit; vertical-align: baseline; - text-align: inherit; - color: inherit; - background: transparent; + } table { @@ -38,13 +146,13 @@ html { } body { - font-family: "Fira Sans", Helvetica, Arial, sans-serif; text-align: left; - color: #333; background: #FFFFFF; + color: var(--color); + background-color: var(--main-background); } -.content { +body { max-width: 90ex; margin-left: calc(10vw + 20ex); margin-right: 4ex; @@ -54,24 +162,32 @@ body { line-height: 1.5; } -.content>header { +header { margin-bottom: 30px; } -.content>header nav { +nav { font-family: "Fira Sans", Helvetica, Arial, sans-serif; } /* Basic markup elements */ b, strong { - font-weight: 500; + font-weight: bold; } -i, em { +i { font-style: italic; } +em, i em.odd{ + font-style: italic; +} + +em.odd, i em { + font-style: normal; +} + sup { vertical-align: super; } @@ -129,32 +245,32 @@ li>*:first-child { a { text-decoration: none; - color: #2C5CBD; + color: var(--link-color); } a:hover { - box-shadow: 0 1px 0 0 #2C5CBD; + box-shadow: 0 1px 0 0 var(--link-color); } /* Linked highlight */ *:target { - background-color: rgba(187,239,253,0.3) !important; - box-shadow: 0 0px 0 1px rgba(187,239,253,0.8) !important; + background-color: var(--target-background) !important; + box-shadow: 0 0px 0 1px var(--target-shadow) !important; border-radius: 1px; } -*:hover>a.anchor { +*:hover > a.anchor { visibility: visible; } a.anchor:before { - content: "#" + content: "#"; } a.anchor:hover { box-shadow: none; text-decoration: none; - color: #555; + color: var(--anchor-hover); } a.anchor { @@ -168,7 +284,7 @@ a.anchor { padding-right: 0.4em; padding-left: 0.4em; /* To remain selectable */ - color: #d5d5d5; + color: var(--anchor-color); } .spec > a.anchor { @@ -177,10 +293,10 @@ a.anchor { } .xref-unresolved { - color: #2C5CBD; + color: #2C94BD; } .xref-unresolved:hover { - box-shadow: 0 1px 0 0 #CC6666; + box-shadow: 0 1px 0 0 var(--xref-shadow); } /* Section and document divisions. @@ -205,7 +321,7 @@ h1 { h1 { font-weight: 500; font-size: 1.953em; - box-shadow: 0 1px 0 0 #ddd; + box-shadow: 0 1px 0 0 var(--header-shadow); } h2 { @@ -244,6 +360,22 @@ h4 { font-size: 1.12em; } +/* Comment delimiters, hidden but accessible to screen readers and + selected for copy/pasting */ + +/* Taken from bootstrap */ +/* See also https://stackoverflow.com/a/27769435/4220738 */ +.comment-delim { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} /* Preformatted and code */ @@ -254,20 +386,21 @@ tt, code, pre { pre { padding: 0.1em; - border: 1px solid #eee; + border: 1px solid var(--pre-border-color); border-radius: 5px; overflow-x: auto; } -p code, li code { - background-color: #f6f8fa; - color: #0d2b3e; +p code, +li code { + background-color: var(--li-code-background); + color: var(--li-code-color); border-radius: 3px; padding: 0 0.3ex; } p a > code { - color: #2C5CBD; + color: var(--link-color); } /* Code blocks (e.g. Examples) */ @@ -282,44 +415,22 @@ pre code { font-weight: 500; } +.arrow { white-space: nowrap } + /* Module member specification */ -.spec:not(.include), .spec.include details summary { - background-color: #f6f8fa; +.spec { + background-color: var(--spec-summary-background); border-radius: 3px; - border-left: 4px solid #5c9cf5; + border-left: 4px solid var(--spec-summary-border-color); border-right: 5px solid transparent; padding: 0.35em 0.5em; } -.spec.include details summary:hover { - background-color: #ebeff2; -} - -dl, div.spec, .doc, aside { +div.spec, .def-doc { margin-bottom: 20px; } -dl > dd { - padding: 0.5em; -} - -dd> :first-child { - margin-top: 0; -} - -dl:last-child, dd> :last-child, aside:last-child, article:last-child { - margin-bottom: 0; -} - -dt+dt { - margin-top: 15px; -} - -section+section, section > header + dl { - margin-top: 25px; -} - .spec.type .variant { margin-left: 2ch; } @@ -341,27 +452,22 @@ div.def { padding-left: 2ex; } -div.def+div.doc { +div.def+div.def-doc { margin-left: 1ex; margin-top: 2.5px } -div.doc>*:first-child { +div.def-doc>*:first-child { margin-top: 0; } -/* The elements other than heading should be wrapped in