mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-06-15 20:32:44 +00:00
Spaceship: valid api response
This commit is contained in:
parent
e55a54f3d4
commit
827315e059
@ -195,6 +195,18 @@ _spaceship_api_request() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
_debug "API response: $response"
|
||||
_debug "API response body: $response"
|
||||
|
||||
if [ "$method" = "GET" ]; then
|
||||
if _contains "$(_head_n 1 <"$HTTP_HEADER")" '200'; then
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
if _contains "$(_head_n 1 <"$HTTP_HEADER")" '204'; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
_debug "API response header: $HTTP_HEADER"
|
||||
return 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user