diff options
author | tv <tv@shackspace.de> | 2015-05-20 19:18:55 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-05-20 19:18:55 +0200 |
commit | d7319a7e8756352a0a3b297fadcf752a6ab777ca (patch) | |
tree | 49e4458fe988de0484c3951fb9ec06cb784c6f4c | |
parent | 56f65724e368533342c8df146e412130afa4491e (diff) |
lib cac: curl w/-G
-rw-r--r-- | lib/cac.sh | 20 |
1 files changed, 16 insertions, 4 deletions
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 } |