Ezcurl_lwt
include module type of struct include Ezcurl_core end
module Config = Ezcurl_core.Config
Configuration for the client.
val delete : t -> unit
Delete the client. It cannot be used anymore.
Make a temporary client, call the function with it, then cleanup.
type response_info = Ezcurl_core.response_info = {
ri_response_time : float;
Total time (in seconds) for the request/response pair. See Curl.get_totaltime
.
ri_redirect_count : int;
Number of redirects cURL followed. See Curl.get_redirectcount
.
}
Metadata about a response from the server.
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;
Response code. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
*)headers : (string * string) list;
Response headers
*)body : string;
Response body, or ""
info : response_info;
Information about the response
*)}
Response for a given request.
val pp_response : Stdlib.Format.formatter -> response -> unit
val string_of_response : response -> string
type meth = Ezcurl_core.meth =
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
include sig ... end
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