src/Google/Client.php
public function execute(RequestInterface $request, $expectedClass = null)
  {
    $request = $request->withHeader(
        'User-Agent',
        $this->config['application_name']
        . " " . self::USER_AGENT_SUFFIX
        . $this->getLibraryVersion()
    );

    // call the authorize method
    // this is where most of the grunt work is done
    $http = $this->authorize();

    return Google_Http_REST::execute(
        $http,
        $request,
        $expectedClass,
        $this->config['retry'],
        $this->config['retry_map']
    );
  }
public function execute(RequestInterface $request, $expectedClass = null)
  {
    $request = $request->withHeader(
        'User-Agent',
        $this->config['application_name']
        . " " . self::USER_AGENT_SUFFIX
        . $this->getLibraryVersion()
    );

    // call the authorize method
    // this is where most of the grunt work is done
    $http = $this->authorize();

    return Google_Http_REST::execute(
        $http,
        $request,
        $expectedClass,
        $this->config['retry'],
        $this->config['retry_map']
    );
  }
Helper method to execute deferred HTTP requests.

@param $request Psr\Http\Message\RequestInterface|Google_Http_Batch
@throws Google_Exception
@return object of the type of the expected class or Psr\Http\Message\ResponseInterface.