Метод | Описание | |
---|---|---|
__construct ( array $config = [] ) | ||
send ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : Psr\Http\Message\ResponseInterface | Deliver the request. |
Метод | Описание | |
---|---|---|
convertToGoogleException ( Exception $ex ) : ServiceException | Convert any exception to a Google Exception. | |
fetchCredentials ( ) : array | Fetches credentials. | |
getExceptionMessage ( Exception $ex ) : string | Gets the exception message. | |
getRetryFunction ( ) : boolean | Determines whether or not the request should be retried. | |
getToken ( ) : string | Gets the access token. | |
signRequest ( Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\RequestInterface | Sign the request. |
public __construct ( array $config = [] ) | ||
$config | array | [optional] { Configuration options. Please see {@see \Google\Cloud\RequestWrapperTrait::setCommonDefaults()} for the other available options. @type string $accessToken Access token used to sign requests. @type callable $authHttpHandler A handler used to deliver Psr7 requests specifically for authentication. @type callable $httpHandler A handler used to deliver Psr7 requests. @type array $httpOptions HTTP client specific configuration options. @type bool $shouldSignRequest Whether to enable request signing. } |
public send ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\RequestInterface | Psr7 request. |
$options | array | [optional] { Request options. @type int $retries Number of retries for a failed request. **Defaults to** `3`. @type array $httpOptions HTTP client specific configuration options. } |
Результат | Psr\Http\Message\ResponseInterface |