small change for response logging
This commit is contained in:
parent
b4ec498f32
commit
27dab93cf5
@ -136,6 +136,8 @@ class Client
|
|||||||
|
|
||||||
list($statusCode, $responseBody) = $this->checkResponse($curlHandler, $method);
|
list($statusCode, $responseBody) = $this->checkResponse($curlHandler, $method);
|
||||||
|
|
||||||
|
$this->logResponse($responseBody, $statusCode);
|
||||||
|
|
||||||
return new ApiResponse($statusCode, $responseBody);
|
return new ApiResponse($statusCode, $responseBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,8 +198,6 @@ class Client
|
|||||||
$statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE);
|
$statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE);
|
||||||
$contentType = curl_getinfo($curlHandler, CURLINFO_CONTENT_TYPE);
|
$contentType = curl_getinfo($curlHandler, CURLINFO_CONTENT_TYPE);
|
||||||
|
|
||||||
$this->logResponse($responseBody, $statusCode);
|
|
||||||
|
|
||||||
if (503 === $statusCode) {
|
if (503 === $statusCode) {
|
||||||
throw new LimitException("Service temporary unavailable");
|
throw new LimitException("Service temporary unavailable");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user