emarref / guzzle-param-middleware
Guzzle Middleware that adds one or more query parameters to all requests for a client.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 9 270
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- guzzlehttp/guzzle: ^6.0
Requires (Dev)
- phpunit/phpunit: ^5.3
This package is auto-updated.
Last update: 2022-02-23 08:01:35 UTC
README
Guzzle Middleware that adds one or more query parameters to all requests for a client.
Usage
$paramMiddleware = new Emarref\Guzzle\Middleware\ParamMiddleware(['foo' => 'bar']); $stack = GuzzleHttp\HandlerStack::create(); $stack->push($paramMiddleware); $client = new GuzzleHttp\Client(['handler' => $stack]);
All requests made by the guzzle client above will include foo=bar
in
the GET query.