This commit is contained in:
swrup 2025-11-30 19:12:22 +01:00
parent 52fabd085a
commit b14e665dcb

View file

@ -11,14 +11,14 @@ let download ~base_url ~output =
let uri = let uri =
Uri.with_path (Uri.of_string base_url) "/management/keys/" |> Uri.to_string Uri.with_path (Uri.of_string base_url) "/management/keys/" |> Uri.to_string
in in
let wget = Cmd.(v "wget" % "-O" % output % uri) in OS.Cmd.run Cmd.(v "curl" (* % "-s" *) % "-o" % output % "-X" % "GET" % uri)
OS.Cmd.run wget
let upload ~base_url ~input = let upload ~base_url ~input =
let open Bos in let open Bos in
let uri = let uri =
Uri.with_path (Uri.of_string base_url) "/management/keys/" |> Uri.to_string Uri.with_path (Uri.of_string base_url) "/management/keys/" |> Uri.to_string
in in
(*
let wget = let wget =
Cmd.( Cmd.(
v "wget" v "wget"
@ -31,6 +31,18 @@ let upload ~base_url ~input =
% uri) % uri)
in in
OS.Cmd.run wget 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 setup ~output =
let output = Fpath.v output in let output = Fpath.v output in