google 驱动器 api v2 php
google drive api v2 php
无法下载文件。文档的功能https://developers.google.com/drive/v2/web/manage-downloads
写入:Class 'Google_Http_Request' not found
、
此处https://github.com/google/google-api-php-client/blob/master/UPGRADING.md
写着Removed Google_Http_Request
.
如果您使用 likeness ,请将其更改为 GET 请求并替换为 link ,如上文 link 中所述
$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
谁有过这样的经历?有什么解决办法吗?
我在使用 Google 云存储 php API 时遇到了同样的问题。像这样尝试:
$httpClient = $client->authorize();
$response = $httpClient->get($url);
然后,如果您需要将其转储到浏览器(例如,如果您正在检索图像):
echo $response->getBody();
无法下载文件。文档的功能https://developers.google.com/drive/v2/web/manage-downloads
写入:Class 'Google_Http_Request' not found
、
此处https://github.com/google/google-api-php-client/blob/master/UPGRADING.md
写着Removed Google_Http_Request
.
如果您使用 likeness ,请将其更改为 GET 请求并替换为 link ,如上文 link 中所述
$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
谁有过这样的经历?有什么解决办法吗?
我在使用 Google 云存储 php API 时遇到了同样的问题。像这样尝试:
$httpClient = $client->authorize();
$response = $httpClient->get($url);
然后,如果您需要将其转储到浏览器(例如,如果您正在检索图像):
echo $response->getBody();