Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 2.78 KB

File metadata and controls

60 lines (42 loc) · 2.78 KB

Guzzle request content compress middleware

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads Average time to resolve an issue 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 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.