src/Google/Http/REST.php
public static function execute(
      ClientInterface $client,
      RequestInterface $request,
      $expectedClass = null,
      $config = array(),
      $retryMap = null
  ) {
    $runner = new Google_Task_Runner(
        $config,
        sprintf('%s %s', $request->getMethod(), (string) $request->getUri()),
        array(get_class(), 'doExecute'),
        array($client, $request, $expectedClass)
    );

    if (null !== $retryMap) {
      $runner->setRetryMap($retryMap);
    }

    return $runner->run();
  }
public static function execute(
      ClientInterface $client,
      RequestInterface $request,
      $expectedClass = null,
      $config = array(),
      $retryMap = null
  ) {
    $runner = new Google_Task_Runner(
        $config,
        sprintf('%s %s', $request->getMethod(), (string) $request->getUri()),
        array(get_class(), 'doExecute'),
        array($client, $request, $expectedClass)
    );

    if (null !== $retryMap) {
      $runner->setRetryMap($retryMap);
    }

    return $runner->run();
  }
Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries
when errors occur.

@param Google_Client $client
@param Psr\Http\Message\RequestInterface $req
@return array decoded result
@throws Google_Service_Exception on server side error (ie: not authenticated,
invalid or malformed post body, invalid url)