Added timeout value to Guzzle client

This commit is contained in:
Yağızhan authored and GitHub committed 2021-10-25 00:35:41 +03:00
1 parent e59b137256
commit 9c8f258f61
1 file changed
+6 -1
+6 -1
View File
@@ -261,7 +261,12 @@ $di['validator'] = function () use ($di){
return $validator;
};
$di['guzzle_client'] = function () use($di) {
return new GuzzleHttp\Client(['headers' => ['User-Agent' => $di['config']['guzzle']['user_agent']]]);
return new GuzzleHttp\Client([
'headers' => [
'User-Agent' => $di['config']['guzzle']['user_agent']
],
'timeout' => $di['config']['guzzle']['timeout']
]);
};
$di['mail'] = function () {
return new Box_Mail();