谷歌驱动api v2 php

谷歌驱动api v2 php,php,google-drive-api,google-api-php-client,Php,Google Drive Api,Google Api Php Client,下载文件时不起作用。文档的功能https://developers.google.com/drive/v2/web/manage-downloads 写入:未找到类“Google\u Http\u请求” 这里https://github.com/google/google-api-php-client/blob/master/UPGRADING.md 据说删除了Google\u Http\u请求 如果使用相似性,请将其更改为GET请求并替换链接,如上面最后一个链接中所述 $httpClient

下载文件时不起作用。文档的功能
https://developers.google.com/drive/v2/web/manage-downloads

写入:
未找到类“Google\u Http\u请求”

这里
https://github.com/google/google-api-php-client/blob/master/UPGRADING.md
据说
删除了Google\u Http\u请求

如果使用相似性,请将其更改为GET请求并替换链接,如上面最后一个链接中所述

$httpClient = $client->authorize(); 
$request = new GuzzleHttp\Psr7\Request('POST', $url); 
$response = $httpClient->send($request);
写道:

Argument 1 passed to GuzzleHttp\Client::send() must implement interface GuzzleHttp\Message\RequestInterface, instance of GuzzleHttp\Psr7\Request given, called in \file.php on line 37 and defined in \vendor\guzzlehttp\guzzle\src\Client.php on line 158

那些经历过这种情况的人?这个问题有什么解决方案吗?

我在谷歌云存储php API上也遇到了同样的问题。试着这样做:

$httpClient = $client->authorize();
$response = $httpClient->get($url);
然后,如果需要将其转储到浏览器(如检索图像):

echo $response->getBody();