add 204 as an non-error response code from API (recieved after a DELETE)
This commit is contained in:
parent
5cbf35add3
commit
5959b1ffe5
@ -48,7 +48,7 @@ class Client{
|
|||||||
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|
||||||
if(in_array($status_code,[200,201])){
|
if(in_array($status_code,[200,201,204])){
|
||||||
return json_decode($result);
|
return json_decode($result);
|
||||||
}else{
|
}else{
|
||||||
throw new \Exception("API $status_code Code: ".$result);
|
throw new \Exception("API $status_code Code: ".$result);
|
||||||
|
Loading…
Reference in New Issue
Block a user