6 use GuzzleHttp\Psr7\Utils;
7 use Psr\Http\Message\RequestInterface;
14 return function_exists(
'gzencode');
17 public function __invoke(RequestInterface $request, array $options = []): RequestInterface
19 $content = gzencode($request->getBody()->getContents());
20 $request = Utils::modifyRequest($request, [
23 'Content-Encoding' =>
'gzip',
24 'Content-Length' => strlen($content),