Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. type dest = {uri:Uri.t;
  2. auth_hdrs:Cohttp.Header.t}
  3.  
  4.  
  5. let fetch des =
  6. let open Lwt in
  7. try
  8. Cohttp_lwt_unix.Client.call ~headers:des.auth_hdrs `GET des.uri >>=
  9. fun (resp, body) ->
  10. Cohttp_lwt_body.to_string body >>= fun b ->
  11. Lwt_io.printl b
  12. with _ ->
  13. Lwt.return (print_endline "some exception")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement