diff options
author | tv <tv@krebsco.de> | 2015-05-20 19:18:55 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-05-20 19:18:55 +0200 |
commit | c8b1e69b21e321d54823379e622b53aae992f471 (patch) | |
tree | 49e4458fe988de0484c3951fb9ec06cb784c6f4c /lib | |
parent | 2a3f6d428ee795b2b0af19bb9fa7152a7f0db201 (diff) |
lib cac: curl w/-G
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cac.sh | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1,19 +1,31 @@ cac_listservers() { if test -z "${cac_via-}"; then curl -fsS \ - "https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key&login=$cac_login" + -G \ + --data-urlencode key="$cac_key" \ + --data-urlencode login="$cac_login" \ + 'https://panel.cloudatcost.com/api/v1/listservers.php' else ssh -q $cac_via -t curl -fsS \ - "https://panel.cloudatcost.com/api/v1/listservers.php?key=$cac_key\\&login=$cac_login" + -G \ + --data-urlencode key="$cac_key" \ + --data-urlencode login="$cac_login" \ + 'https://panel.cloudatcost.com/api/v1/listservers.php' fi } cac_listtasks() { if test -z "${cac_via-}"; then curl -fsS \ - "https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key&login=$cac_login" + -G \ + --data-urlencode key="$cac_key" \ + --data-urlencode login="$cac_login" \ + 'https://panel.cloudatcost.com/api/v1/listtasks.php' else ssh -q $cac_via -t curl -fsS \ - "https://panel.cloudatcost.com/api/v1/listtasks.php?key=$cac_key\\&login=$cac_login" + -G \ + --data-urlencode key="$cac_key" \ + --data-urlencode login="$cac_login" \ + 'https://panel.cloudatcost.com/api/v1/listtasks.php' fi } |