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:
Arnoud Vermeer 2020-12-15 16:14:34 +01:00 committed by GitHub
parent 44615c6fa2
commit c51aa7a91d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,9 @@ _pdns_rest() {
export _H1="X-API-Key: $PDNS_Token"
if [ ! "$method" = "GET" ]; then
if [ "$method" == "PATCH" ]; then
export _H2="Content-Type: application/json"
fi
_debug data "$data"
response="$(_post "$data" "$PDNS_Url$ep" "" "$method")"
else