Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
0f26b1ea
Unverified
Commit
0f26b1ea
authored
May 24, 2022
by
neil
Committed by
GitHub
May 24, 2022
Browse files
Merge pull request #4096 from nederhost/dev
Fix dns_nederhost to work correctly with wget instead of curl.
parents
80e6b1fc
4047adcc
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_nederhost.sh
View file @
0f26b1ea
#!/usr/bin/env sh
#NederHost_Key="sdfgikogfdfghjklkjhgfcdcfghj
k
"
#NederHost_Key="sdfgikogfdfghjklkjhgfcdcfghj"
NederHost_Api
=
"https://api.nederhost.nl/dns/v1"
...
...
@@ -112,12 +112,8 @@ _nederhost_rest() {
export
_H1
=
"Authorization: Bearer
$NederHost_Key
"
export
_H2
=
"Content-Type: application/json"
if
[
"
$m
"
!=
"GET"
]
;
then
_debug data
"
$data
"
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"
)
"
_debug
"http response code
$_code
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment