private function CurlRequest::execute in Smart IP 6.2
Same name and namespace in other branches
- 7.2 includes/vendor/maxmind/web-service-common/src/WebService/Http/CurlRequest.php \MaxMind\WebService\Http\CurlRequest::execute()
2 calls to CurlRequest::execute()
- CurlRequest::get in includes/
vendor/ maxmind/ web-service-common/ src/ WebService/ Http/ CurlRequest.php - CurlRequest::post in includes/
vendor/ maxmind/ web-service-common/ src/ WebService/ Http/ CurlRequest.php
File
- includes/
vendor/ maxmind/ web-service-common/ src/ WebService/ Http/ CurlRequest.php, line 88
Class
- CurlRequest
- This class is for internal use only. Semantic versioning does not not apply. @package MaxMind\WebService\Http @internal
Namespace
MaxMind\WebService\HttpCode
private function execute($curl) {
$body = curl_exec($curl);
if ($errno = curl_errno($curl)) {
$errorMessage = curl_error($curl);
throw new HttpException("cURL error ({$errno}): {$errorMessage}", 0, $this->url);
}
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
curl_close($curl);
return array(
$statusCode,
$contentType,
$body,
);
}