Browse Source

remove unnecessary variable 'export' on variable _H4

pull/5172/head
Vinicius Mello 2 weeks ago
parent
commit
4f96a2a667
  1. 5
      dnsapi/dns_linode_v4.sh

5
dnsapi/dns_linode_v4.sh

@ -182,7 +182,6 @@ _rest() {
export _H1="Accept: application/json"
export _H2="Content-Type: application/json"
export _H3="Authorization: Bearer $LINODE_V4_API_KEY"
export _H4 # used to query for the root domain on _get_root()
if [ "$mtd" != "GET" ]; then
# both POST and DELETE.
@ -192,10 +191,6 @@ _rest() {
response="$(_get "$LINODE_V4_API_URL$ep$data")"
fi
# unset _H4, for it not to be used on every request unnecessarily, because it
# causes random failures inside Linode API when using unnecessary _H4 parameters (e.g. X-Filter)
unset _H4
if [ "$?" != "0" ]; then
_err "error $ep"
return 1

Loading…
Cancel
Save