protected function exec()
    {
        curl_setopt($this->curl, CURLOPT_URL, $this->url);
        $response_text = curl_exec($this->curl);
        $this->info    = curl_getinfo($this->curl);
        $this->logInformation();
        
        if (false === $response_text) {
            throw new Exceptions\WebException(
                curl_error($this->curl),
                curl_errno($this->curl)
            );
        }
        
        /** @var $options string */
        $this->response["info"] = $this->info;
        $this->response["code"] = $this->response["info"]["http_code"];
        $this->response["body"] = substr(
            $response_text,
            $this->response["info"]["header_size"]
        );
        $this->response["headers"] = substr(
            $response_text,
            0,
            $this->response["info"]["header_size"]
        );
        $this->response["headers"] = $this->getHeadersParser()->parse(
            $this->response["headers"],
            $options
        );
        $this->response["version"] = explode(" ", $options, 3)[0];
    }
protected function exec()
    {
        curl_setopt($this->curl, CURLOPT_URL, $this->url);
        $response_text = curl_exec($this->curl);
        $this->info    = curl_getinfo($this->curl);
        $this->logInformation();
        
        if (false === $response_text) {
            throw new Exceptions\WebException(
                curl_error($this->curl),
                curl_errno($this->curl)
            );
        }
        
        /** @var $options string */
        $this->response["info"] = $this->info;
        $this->response["code"] = $this->response["info"]["http_code"];
        $this->response["body"] = substr(
            $response_text,
            $this->response["info"]["header_size"]
        );
        $this->response["headers"] = substr(
            $response_text,
            0,
            $this->response["info"]["header_size"]
        );
        $this->response["headers"] = $this->getHeadersParser()->parse(
            $this->response["headers"],
            $options
        );
        $this->response["version"] = explode(" ", $options, 3)[0];
    }
protected function exec ( ) { curl_setopt ( $ this -> curl , CURLOPT_URL , $ this -> url ) ; $ response_text = curl_exec ( $ this -> curl ) ; $ this -> info = curl_getinfo ( $ this -> curl ) ; $ this -> logInformation ( ) ; if ( false === $ response_text ) { throw new Exceptions \ WebException ( curl_error ( $ this -> curl ) , curl_errno ( $ this -> curl ) ) ; } /** @var $options string */ $ this -> response [ "info" ] = $ this -> info ; $ this -> response [ "code" ] = $ this -> response [ "info" ] [ "http_code" ] ; $ this -> response [ "body" ] = substr ( $ response_text , $ this -> response [ "info" ] [ "header_size" ] ) ; $ this -> response [ "headers" ] = substr ( $ response_text , 0 , $ this -> response [ "info" ] [ "header_size" ] ) ; $ this -> response [ "headers" ] = $ this -> getHeadersParser ( ) -> parse ( $ this -> response [ "headers" ] , $ options ) ; $ this -> response [ "version" ] = explode ( " " , $ options , 3 ) [ 0 ] ; }
Executes the configured request
Executes the configured request