ensi/guzzle-multibyte

guzzle multibyte

0.2.0 2024-06-26 10:29 UTC

This package is auto-updated.

Last update: 2024-11-27 09:13:13 UTC


README

Latest Version on Packagist Tests Total Downloads

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

  1. composer install
  2. 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.