public function execute($method, $location)
{
curl_setopt_array($this->curl, array(CURLOPT_URL => $location, CURLOPT_COOKIE => $this->getRequestCookies(), CURLOPT_CUSTOMREQUEST => $method));
if (!($response = curl_exec($this->curl))) {
$this->restart();
throw new EmptyResponseException($this, $location);
}
$response = new CurlClientResponse($response);
$this->cookies = array_merge($this->cookies, $response->getCookies());
if ($this->restart == true) {
$this->restart();
}
return $response;
}