Skip to content

Commit

Permalink
Add request timeout option
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-falda committed Dec 4, 2023
1 parent 61347e2 commit d99a01e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

class Client
{
private const REQUEST_TIMEOUT = 10.0;

private Configuration $configuration;
private HashGenerator $hashGenerator;
private ClientInterface $guzzle;
Expand Down Expand Up @@ -57,6 +59,7 @@ private function request(string $endpoint, Request\Request $request): array
'POST',
sprintf('%s/%s', $this->configuration->getUrl(), $endpoint),
[
RequestOptions::TIMEOUT => self::REQUEST_TIMEOUT,
RequestOptions::JSON => \array_merge($auth, $request->toArray()),
]
);
Expand Down

0 comments on commit d99a01e

Please sign in to comment.