ensi / guzzle-multibyte
guzzle multibyte
Installs: 49 877
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Language:Shell
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.2
- pestphp/pest: ^1.22 || ^2.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.11
- spaze/phpstan-disallowed-calls: ^2.15
This package is auto-updated.
Last update: 2024-10-27 09:02:00 UTC
README
This package provides improved BodySummarizer() that can correctly handle and truncate large multibyte responses.
Installation
You can install the package via composer:
composer require ensi/guzzle-multibyte
Basic usage
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, ]);
Contributing
Please see CONTRIBUTING for details.
Testing
- composer install
- composer test
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.