Update dns_pdns.sh
Missing application/json header is causing this PATCH to fail, because it gets processed as form data.
This commit is contained in:
parent
44615c6fa2
commit
c51aa7a91d
@ -207,6 +207,9 @@ _pdns_rest() {
|
|||||||
export _H1="X-API-Key: $PDNS_Token"
|
export _H1="X-API-Key: $PDNS_Token"
|
||||||
|
|
||||||
if [ ! "$method" = "GET" ]; then
|
if [ ! "$method" = "GET" ]; then
|
||||||
|
if [ "$method" == "PATCH" ]; then
|
||||||
|
export _H2="Content-Type: application/json"
|
||||||
|
fi
|
||||||
_debug data "$data"
|
_debug data "$data"
|
||||||
response="$(_post "$data" "$PDNS_Url$ep" "" "$method")"
|
response="$(_post "$data" "$PDNS_Url$ep" "" "$method")"
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user