From d7319a7e8756352a0a3b297fadcf752a6ab777ca Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 20 May 2015 19:18:55 +0200 Subject: lib cac: curl w/-G --- lib/cac.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/cac.sh b/lib/cac.sh index 723c73769..47b73240a 100644 --- a/lib/cac.sh +++ b/lib/cac.sh @@ -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 } -- cgit v1.2.3