softonic / guzzle-request-content-compress-middleware
Guzzle request content compress middleware
1.0.1
2019-07-09 09:43 UTC
Requires
- php: >=7.1
- ext-zlib: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.4
- mockery/mockery: ^1.2
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-12-11 00:02:49 UTC
README
This middleware adds the ability to automatically compress the content of a request
Installation
Via composer:
composer require softonic/guzzle-request-content-compress-middleware
Documentation
To use the Middleware push it to the handler:
$stack = HandlerStack::create();
$compressMiddleware = new CompressContentRequest();
$stack->push($compressMiddleware);
$client = new Client(['handler' => $stack]);
Testing
softonic/guzzle-request-content-compress-middleware
has a PHPUnit test suite and a coding style compliance test suite using PHP CS Fixer.
To run the tests, run the following command from the project folder.
$ docker-compose run tests
To run interactively using PsySH:
$ docker-compose run psysh
License
The Apache 2.0 license. Please see LICENSE for more information.