1 (* Copyright (c) 2014, Thomas Leonard, <talex5@gmail.com> *)
9 let printfn fmt
= ksprintf print_endline fmt
13 set_url
h "http://localhost:1/missing.png";
14 set_errorbuffer
h buf
;
23 with CurlException
(code
,_
,_
) ->
24 if verbose then printfn "Sync errors: %s <%s>" (strerror code
) !buf1
29 let code = Curl_lwt.perform
h |> Lwt_main.run
in
30 if verbose then printfn "Lwt errors: %s <%s>" (strerror
code) !buf2;
33 (printfn "FAILED: %S <> %S" !buf1 !buf2; exit
1)
35 (printfn "OK"; exit
0)