We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 92ec747 + fd22ed4 commit 683a8edCopy full SHA for 683a8ed
1 file changed
src/Google/RestApi.php
@@ -18,6 +18,8 @@ class RestApi
18
{
19
public const API_URI = 'https://www.googleapis.com';
20
public const OAUTH_URL = 'https://accounts.google.com/o/oauth2/v2/auth';
21
+ private const DEFAULT_CONNECT_TIMEOUT = 30;
22
+ private const DEFAULT_REQUEST_TIMEOUT = 5 * 60;
23
24
/** @var int */
25
protected $maxBackoffs = 7;
@@ -118,6 +120,8 @@ protected function getClient(string $baseUri = self::API_URI): Client
118
120
return new Client([
119
121
'base_uri' => $baseUri,
122
'handler' => $handlerStack,
123
+ 'connect_timeout' => self::DEFAULT_CONNECT_TIMEOUT,
124
+ 'timeout' => self::DEFAULT_REQUEST_TIMEOUT,
125
]);
126
}
127
0 commit comments