softonic/guzzle-request-content-compress-middleware

Guzzle request content compress middleware

1.0.1 2019-07-09 09:43 UTC

This package is auto-updated.

Last update: 2024-11-10 23:51:03 UTC


README

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.