public function execute($returnTransfer = TRUE) {
        //Need transfer return
        if($returnTransfer === TRUE) {
            $this->setOption(CURLOPT_RETURNTRANSFER, 1);
        }

        $result = curl_exec($this->handler);

        //Error handling
        if(curl_errno($this->handler)) {
            $format = [curl_errno($this->handler), curl_error($this->handler)];
            $this->close();
            throw RuntimeException::createByFormat('Error executing request, error code: %s, Message: %s', $format);
        }

        return $result;
    }
public function execute($returnTransfer = TRUE) {
        //Need transfer return
        if($returnTransfer === TRUE) {
            $this->setOption(CURLOPT_RETURNTRANSFER, 1);
        }

        $result = curl_exec($this->handler);

        //Error handling
        if(curl_errno($this->handler)) {
            $format = [curl_errno($this->handler), curl_error($this->handler)];
            $this->close();
            throw RuntimeException::createByFormat('Error executing request, error code: %s, Message: %s', $format);
        }

        return $result;
    }
public function execute ( $ returnTransfer = TRUE ) { //Need transfer return if ( $ returnTransfer === TRUE ) { $ this -> setOption ( CURLOPT_RETURNTRANSFER , 1 ) ; } $ result = curl_exec ( $ this -> handler ) ; //Error handling if ( curl_errno ( $ this -> handler ) ) { $ format = [ curl_errno ( $ this -> handler ) , curl_error ( $ this -> handler ) ] ; $ this -> close ( ) ; throw RuntimeException :: createByFormat ( 'Error executing request, error code: %s, Message: %s' , $ format ) ; } return $ result ; }
Execute the prepared request and optionally returns the response

@param bool $returnTransfer Returns the returned response

@throws \BuildR\Foundation\Exception\RuntimeException

@return array|\stdClass

@codeCoverageIgnore
Execute the prepared request and optionally returns the response