Ezcurl_lwtinclude module type of struct include Ezcurl_core endmodule Config = Ezcurl_core.ConfigConfiguration for the client.
A client, i.e. a cURL instance. The wrapping record has been present since 0.3
val make :
?set_opts:(Curl.t -> unit) ->
?cookiejar_file:string ->
?enable_session_cookies:bool ->
unit ->
tCreate a new client.
val delete : t -> unitDelete the client. It cannot be used anymore.
val with_client : ?set_opts:(Curl.t -> unit) -> (t -> 'a) -> 'aMake a temporary client, call the function with it, then cleanup.
Set no_signal default value for each new client instance. Default is true. See CURLOPT_NOSIGNAL.
module Cookies = Ezcurl_core.CookiesCookie handling.
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 -> unitval string_of_response_info : response_info -> stringtype 'body response = 'body 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 : 'body;Response body, or ""
info : response_info;Information about the response
*)}Response for a given request.
val pp_response_with :
(Stdlib.Format.formatter -> 'a -> unit) ->
Stdlib.Format.formatter ->
'a response ->
unitval pp_response : Stdlib.Format.formatter -> string response -> unitval string_of_response : string response -> stringtype meth = Ezcurl_core.meth = The HTTP method to use
val pp_meth : Stdlib.Format.formatter -> meth -> unitval string_of_meth : meth -> stringmodule type IO = Ezcurl_core.IOmodule type S = Ezcurl_core.Smodule Make = Ezcurl_core.Makeinclude sig ... endval 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 ->
(string Ezcurl_core.response, Curl.curlCode * string) Stdlib.result ioclass type input_stream = object ... endval http_stream :
?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 ->
write_into:input_stream ->
unit ->
(unit Ezcurl_core.response, Curl.curlCode * string) Stdlib.result ioval get :
?tries:int ->
?client:Ezcurl_core.t ->
?config:Ezcurl_core.Config.t ->
?range:string ->
?headers:(string * string) list ->
url:string ->
unit ->
(string Ezcurl_core.response, Curl.curlCode * string) Stdlib.result ioval 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 ->
(string Ezcurl_core.response, Curl.curlCode * string) Stdlib.result ioval 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 ->
(string Ezcurl_core.response, Curl.curlCode * string) Stdlib.result io