Source

ocaml-bitbucket / xcurl.mli

Full commit
camlspotter 7197bd2 
camlspotter 8d61023 
camlspotter e7a867f 
camlspotter 7197bd2 
camlspotter 8d61023 
camlspotter 710bd90 
camlspotter 7197bd2 
camlspotter 132ad72 

val ok200 : string * int * 'a -> [> `Ok of 'a | `Error of [> `Http of string * int * 'a ]]
(** HTTP result to a result monad *)

val get_string : (Curl.handle -> unit) -> [> `Error of [> `Http of string * int * string ] | `Ok of string ]
(** Get string *)

val download : string -> (Curl.handle -> unit) -> [> `Error of [> `Http of string * int * string ] | `Ok of string ]
(** Download file. Return the final downloaded file path.
    At error, the tmp file is not removed since it may contain error message. 
*)