https://github.com/softonic/guzzle-request-content-compress-middleware
This middleware adds the ability to automatically compress the content of a request
https://github.com/softonic/guzzle-request-content-compress-middleware
compress content-encoding guzzle gzip php request
Last synced: 20 days ago
JSON representation
This middleware adds the ability to automatically compress the content of a request
- Host: GitHub
- URL: https://github.com/softonic/guzzle-request-content-compress-middleware
- Owner: softonic
- License: other
- Created: 2019-07-08T09:15:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-10T13:33:23.000Z (over 5 years ago)
- Last Synced: 2025-03-24T19:39:47.013Z (about 1 month ago)
- Topics: compress, content-encoding, guzzle, gzip, php, request
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
Guzzle request content compress middleware
=====[](https://github.com/softonic/guzzle-request-content-compress-middleware/releases)
[](LICENSE.md)
[](https://travis-ci.org/softonic/guzzle-request-content-compress-middleware)
[](https://scrutinizer-ci.com/g/softonic/guzzle-request-content-compress-middleware/code-structure)
[](https://scrutinizer-ci.com/g/softonic/guzzle-request-content-compress-middleware)
[](https://packagist.org/packages/softonic/guzzle-request-content-compress-middleware)
[](http://isitmaintained.com/project/softonic/guzzle-request-content-compress-middleware "Average time to resolve an issue")
[](http://isitmaintained.com/project/softonic/guzzle-request-content-compress-middleware "Percentage of issues still open")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](https://phpunit.de) test suite and a coding style compliance test suite using [PHP CS Fixer](http://cs.sensiolabs.org/).
To run the tests, run the following command from the project folder.
``` bash
$ docker-compose run tests
```To run interactively using [PsySH](http://psysh.org/):
``` bash
$ docker-compose run psysh
```License
-------The Apache 2.0 license. Please see [LICENSE](LICENSE) for more information.
[PSR-2]: http://www.php-fig.org/psr/psr-2/
[PSR-4]: http://www.php-fig.org/psr/psr-4/