Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type dest = {uri:Uri.t;
- auth_hdrs:Cohttp.Header.t}
- let fetch des =
- let open Lwt in
- try
- Cohttp_lwt_unix.Client.call ~headers:des.auth_hdrs `GET des.uri >>=
- fun (resp, body) ->
- Cohttp_lwt_body.to_string body >>= fun b ->
- Lwt_io.printl b
- with _ ->
- Lwt.return (print_endline "some exception")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement