Browse Source
Merge pull request #4096 from nederhost/dev
Fix dns_nederhost to work correctly with wget instead of curl.
pull/4108/head
neil
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
7 deletions
-
dnsapi/dns_nederhost.sh
|
@ -1,6 +1,6 @@ |
|
|
#!/usr/bin/env sh |
|
|
#!/usr/bin/env sh |
|
|
|
|
|
|
|
|
#NederHost_Key="sdfgikogfdfghjklkjhgfcdcfghjk" |
|
|
|
|
|
|
|
|
#NederHost_Key="sdfgikogfdfghjklkjhgfcdcfghj" |
|
|
|
|
|
|
|
|
NederHost_Api="https://api.nederhost.nl/dns/v1" |
|
|
NederHost_Api="https://api.nederhost.nl/dns/v1" |
|
|
|
|
|
|
|
@ -112,12 +112,8 @@ _nederhost_rest() { |
|
|
export _H1="Authorization: Bearer $NederHost_Key" |
|
|
export _H1="Authorization: Bearer $NederHost_Key" |
|
|
export _H2="Content-Type: application/json" |
|
|
export _H2="Content-Type: application/json" |
|
|
|
|
|
|
|
|
if [ "$m" != "GET" ]; then |
|
|
|
|
|
_debug data "$data" |
|
|
_debug data "$data" |
|
|
response="$(_post "$data" "$NederHost_Api/$ep" "" "$m")" |
|
|
response="$(_post "$data" "$NederHost_Api/$ep" "" "$m")" |
|
|
else |
|
|
|
|
|
response="$(_get "$NederHost_Api/$ep")" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
_code="$(grep "^HTTP" "$HTTP_HEADER" | _tail_n 1 | cut -d " " -f 2 | tr -d "\\r\\n")" |
|
|
_code="$(grep "^HTTP" "$HTTP_HEADER" | _tail_n 1 | cut -d " " -f 2 | tr -d "\\r\\n")" |
|
|
_debug "http response code $_code" |
|
|
_debug "http response code $_code" |
|
|