protected function getLongErrorString($curl, $response)
{
$string = $this->getShortErrorString();
$string .= "--curl getinfo: --\n" . var_export($curl->getinfo(), true) . "\n";
$string .= "--request body (size: " . strlen($this->body) . " bytes): --\n";
if (strlen($this->body) > 2000) {
$string .= substr($this->body, 0, 2000);
$string .= "\n (truncated)\n";
} else {
$string .= $this->body . "\n";
}
$string .= "--response body (size: " . strlen($response) . " bytes): --\n{$response}\n--end response body--\n";
return $string;
}