Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fix usage of Guzzle classes
  • Loading branch information
hinnerk-a authored Dec 29, 2024
1 parent 3f457c4 commit 6129728
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Here is a example with `guzzlehttp/guzzle` , `kevinrob/guzzle-cache-middleware`
```php
$apiKey = getenv('LEXOFFICE_API_KEY');

$stack = \GuzzleHttp\HandlerStack();
$stack->push(new \Kevinrob\GuzzleCache\CacheMiddleware\CacheMiddleware(), 'cache');
$stack->push(\Spatie\GuzzleRateLimiterMiddleware\RateLimiterMiddleware\RateLimiterMiddleware::perSecond(2));
$stack = \GuzzleHttp\HandlerStack::create();
$stack->push(new \Kevinrob\GuzzleCache\CacheMiddleware(), 'cache');
$stack->push(\Spatie\GuzzleRateLimiterMiddleware\RateLimiterMiddleware::perSecond(2));

$httpClient = \GuzzleHttp\Client(['handler' => $stack]);
$api = new \Sysix\LexOffice\Api($apiKey, $httpClient);
Expand Down

0 comments on commit 6129728

Please sign in to comment.