diff --git a/tools/offline.ml b/tools/offline.ml index a4aa0843..4e37feb0 100644 --- a/tools/offline.ml +++ b/tools/offline.ml @@ -11,14 +11,14 @@ let download ~base_url ~output = let uri = Uri.with_path (Uri.of_string base_url) "/management/keys/" |> Uri.to_string in - let wget = Cmd.(v "wget" % "-O" % output % uri) in - OS.Cmd.run wget + OS.Cmd.run Cmd.(v "curl" (* % "-s" *) % "-o" % output % "-X" % "GET" % uri) let upload ~base_url ~input = let open Bos in let uri = Uri.with_path (Uri.of_string base_url) "/management/keys/" |> Uri.to_string in + (* let wget = Cmd.( v "wget" @@ -31,6 +31,18 @@ let upload ~base_url ~input = % uri) in OS.Cmd.run wget + *) + OS.Cmd.run + Cmd.( + v "curl" + % "-i" + % "-X" + % "POST" + % "-H" + % "Content-Type: application/json" + % "--data" + % ("@" ^ input) + % uri) let setup ~output = let output = Fpath.v output in