public function CurlHandler::__invoke in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php \GuzzleHttp\Handler\CurlHandler::__invoke()
File
- vendor/
guzzlehttp/ guzzle/ src/ Handler/ CurlHandler.php, line 33
Class
- CurlHandler
- HTTP handler that uses cURL easy handles as a transport layer.
Namespace
GuzzleHttp\HandlerCode
public function __invoke(RequestInterface $request, array $options) {
if (isset($options['delay'])) {
usleep($options['delay'] * 1000);
}
$easy = $this->factory
->create($request, $options);
curl_exec($easy->handle);
$easy->errno = curl_errno($easy->handle);
return CurlFactory::finish($this, $easy, $this->factory);
}