private function check_status($response, $full_url)
{
$resp_code = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
if ($resp_code < 199 || $resp_code > 399 || !empty($response['decoded']->error)) {
$msg = "Server returned: \"HTTP 1.1. {$resp_code}\" \nURL: {$full_url} \nERROR: " . $response['json'];
throw new RestAgentException($msg);
}
}