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.