softonic/guzzle-request-content-compress-middleware

Guzzle 请求内容压缩中间件

1.0.1 2019-07-09 09:43 UTC

This package is auto-updated.

Last update: 2024-09-10 23:30:18 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

此中间件添加了自动压缩请求内容的能力

安装

通过 composer

composer require softonic/guzzle-request-content-compress-middleware

文档

要使用中间件,请将其推送到处理器

$stack = HandlerStack::create();
$compressMiddleware = new CompressContentRequest();
$stack->push($compressMiddleware);

$client = new Client(['handler' => $stack]);

测试

softonic/guzzle-request-content-compress-middleware 包含一个 PHPUnit 测试套件,并使用 PHP CS Fixer 进行编码风格合规性测试。

要从项目文件夹中运行测试,请运行以下命令。

$ docker-compose run tests

要使用 PsySH 交互式运行

$ docker-compose run psysh

许可证

Apache 2.0 许可证。有关更多信息,请参阅 LICENSE