public function executeRequest(Google_Http_Request $request) {
        $curl = new curl();

        if ($request->getPostBody()) {
            $curl->setopt(array('CURLOPT_POSTFIELDS' => $request->getPostBody()));
        }

        $requestHeaders = $request->getRequestHeaders();
        if ($requestHeaders && is_array($requestHeaders)) {
            $curlHeaders = array();
            foreach ($requestHeaders as $k => $v) {
                $curlHeaders[] = "$k: $v";
            }
            $curl->setopt(array('CURLOPT_HTTPHEADER' => $curlHeaders));
        }

        $curl->setopt(array('CURLOPT_URL' => $request->getUrl()));

        $curl->setopt(array('CURLOPT_CUSTOMREQUEST' => $request->getRequestMethod()));
        $curl->setopt(array('CURLOPT_USERAGENT' => $request->getUserAgent()));

        $curl->setopt(array('CURLOPT_FOLLOWLOCATION' => false));
        $curl->setopt(array('CURLOPT_SSL_VERIFYPEER' => true));
        $curl->setopt(array('CURLOPT_RETURNTRANSFER' => true));
        $curl->setopt(array('CURLOPT_HEADER' => true));

        if ($request->canGzip()) {
            $curl->setopt(array('CURLOPT_ENCODING' => 'gzip,deflate'));
        }

        $curl->setopt($this->options);
        $respdata = $this->do_request($curl, $request);

        $infos = $curl->get_info();
        $respheadersize = $infos['header_size'];
        $resphttpcode = (int) $infos['http_code'];
        $curlerrornum = $curl->get_errno();
        $curlerror = $curl->error;

        if ($respdata != CURLE_OK) {
            throw new Google_IO_Exception($curlerror);
        }

        list($responseHeaders, $responseBody) = $this->parseHttpResponse($respdata, $respheadersize);
        return array($responseBody, $responseHeaders, $resphttpcode);
    }