This package provides improved BodySummarizer() that can correctly handle and truncate large multibyte responses.
You can install the package via composer:
composer require ensi/guzzle-multibyte
use Ensi\GuzzleMultibyte\BodySummarizer;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
/** @var HandlerStack $handler */
$handler->push(Middleware::httpErrors(new BodySummarizer()), 'http_errors');
$client = new Client([
'handler' => $handler,
]);
Please see CONTRIBUTING for details.
- composer install
- composer test
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.