private function do_request($curl, $request) {
        $url = $request->getUrl();
        $method = $request->getRequestMethod();
        switch (strtoupper($method)) {
            case 'POST':
                $ret = $curl->post($url, $request->getPostBody());
                break;
            case 'GET':
                $ret = $curl->get($url);
                break;
            case 'HEAD':
                $ret = $curl->head($url);
                break;
            case 'PUT':
                $ret = $curl->put($url);
                break;
            default:
                throw new coding_exception('Unknown request type: ' . $method);
                break;
        }
        return $ret;
    }
private function do_request($curl, $request) {
        $url = $request->getUrl();
        $method = $request->getRequestMethod();
        switch (strtoupper($method)) {
            case 'POST':
                $ret = $curl->post($url, $request->getPostBody());
                break;
            case 'GET':
                $ret = $curl->get($url);
                break;
            case 'HEAD':
                $ret = $curl->head($url);
                break;
            case 'PUT':
                $ret = $curl->put($url);
                break;
            default:
                throw new coding_exception('Unknown request type: ' . $method);
                break;
        }
        return $ret;
    }
private function do_request ( $ curl , $ request ) { $ url = $ request -> getUrl ( ) ; $ method = $ request -> getRequestMethod ( ) ; switch ( strtoupper ( $ method ) ) { case 'POST' : $ ret = $ curl -> post ( $ url , $ request -> getPostBody ( ) ) ; break ; case 'GET' : $ ret = $ curl -> get ( $ url ) ; break ; case 'HEAD' : $ ret = $ curl -> head ( $ url ) ; break ; case 'PUT' : $ ret = $ curl -> put ( $ url ) ; break ; default : throw new coding_exception ( 'Unknown request type: ' . $ method ) ; break ; } return $ ret ; }
Send the request via our curl object.

@param curl $curl prepared curl object.
@param Google_HttpRequest $request The request.
@return string result of the request.
Send the request via our curl object .