original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Send the request via our curl object .