Skip to content

Commit

Permalink
Timeout time is can now be modified via the config
Browse files Browse the repository at this point in the history
  • Loading branch information
samloft committed May 22, 2024
1 parent 75e260b commit 629cbee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/inriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
return [
'inriver_url' => env('INRIVER_URL', 'https://apieuw.productmarketingcloud.com'),
'inriver_api_key' => env('INRIVER_API_KEY'),
'inriver_timeout' => env('INRIVER_TIMEOUT', 30),
];
2 changes: 1 addition & 1 deletion src/InRiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function request(string $method, string $endpoint, array $data = []): ?ar
{
$this->url = "{$this->url}/api/v{$this->version}/";

$client = Http::timeout(30)
$client = Http::timeout(config('inriver.inriver_timeout'))
->withHeaders([
'X-inRiver-APIKey' => $this->apiKey,
]);
Expand Down

0 comments on commit 629cbee

Please sign in to comment.