mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-01-11 10:22:23 +08:00
fix wget support in dns api
This commit is contained in:
@@ -183,11 +183,16 @@ _rest() {
|
||||
_debug sec "$sec"
|
||||
hmac=$(printf "$sec"| openssl md5 |cut -d " " -f 2)
|
||||
_debug hmac "$hmac"
|
||||
|
||||
if [ "$3" ] ; then
|
||||
response="$(curl --silent -X $m "$url" -H "API-KEY: $CX_Key" -H "API-REQUEST-DATE: $cdate" -H "API-HMAC: $hmac" -H 'Content-Type: application/json' -d "$data")"
|
||||
|
||||
_H1="API-KEY: $CX_Key"
|
||||
_H2="API-REQUEST-DATE: $cdate"
|
||||
_H3="API-HMAC: $hmac"
|
||||
_H4="Content-Type: application/json"
|
||||
|
||||
if [ "$data" ] ; then
|
||||
response="$(_post "$data" "$url" "" $m)"
|
||||
else
|
||||
response="$(curl --silent -X $m "$url" -H "API-KEY: $CX_Key" -H "API-REQUEST-DATE: $cdate" -H "API-HMAC: $hmac" -H 'Content-Type: application/json')"
|
||||
response="$(_get "$url")"
|
||||
fi
|
||||
|
||||
if [ "$?" != "0" ] ; then
|
||||
|
||||
Reference in New Issue
Block a user