Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let fetch () =
- let open Lwt in
- let these_headers = [("authorization", " AWS4-HMAC-SHA256 Credential=\
- AKIAILZZXBN6HJNVMCXQ/20150323/\
- us-east-1/s3/aws4_request, \
- /SignedHeaders=host;x-amz-date, \
- /Signature=e0ff67b5b9a7970fffa824d\
- 013c9da0e5deabf4326c7b332bac2757951c5d73f");
- ("host", "s3.amazonaws.com");
- ("x-amz-date", "20150323T002435Z")] |> Cohttp.Header.of_list in
- Cohttp_lwt_unix.Client.call ~headers:these_headers `GET
- (Uri.of_string "https://s3.amazonaws.com\
- /obotoplay/test_files/Dino.stl")
- >>=
- fun (resp, body) ->
- print_endline "hello";
- Cohttp_lwt_body.to_string body >>= fun b ->
- Lwt_io.printl b
- let _ =
- fetch ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement