Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 9a201e9

Browse files
author
Mateusz Gostanski
committed
Timeout added
1 parent 702c0b3 commit 9a201e9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77

88
'logging' => env('API_ERROR_LOGGING', false),
99
'log_channel' => env('API_ERROR_LOG_CHANNEL', 'api-client'),
10+
'timeout' => env('API_TIMEOUT', 5),
1011
];

src/Data/DataFetcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function makeRequest(): Response
4343
[
4444
'Accept' => 'application/json'
4545
]
46-
);
46+
)->timeout(config('api-client.timeout'));
4747

4848
if ($this->token) {
4949
$request = $request->withToken($this->token->getToken());

0 commit comments

Comments
 (0)