This commit is contained in:
swrup 2025-11-30 19:12:22 +01:00
parent 52fabd085a
commit 2f373b7517
2 changed files with 15 additions and 2 deletions

View file

@ -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