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;
    }
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;
    }
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 ; }
Executes a Curl.

@param  String $method
@param  String $location
@return CurlClientResponse
@throws Inconsistent
Executes a Curl .