Skip to content

ensi-platform/guzzle-multibyte

Repository files navigation

Guzzle multibyte

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.