Amp\Artax\Client::normalizeRequestEncodingHeaderForZlib PHP Method

normalizeRequestEncodingHeaderForZlib() private method

private normalizeRequestEncodingHeaderForZlib ( Amp\Artax\Request $request, array $options )
$request Amp\Artax\Request
$options array
    private function normalizeRequestEncodingHeaderForZlib(Request $request, array $options)
    {
        $autoEncoding = $options[self::OP_AUTO_ENCODING];
        if ($autoEncoding && $this->hasZlib) {
            $request->setHeader('Accept-Encoding', 'gzip, identity');
        } elseif ($autoEncoding) {
            $request->removeHeader('Accept-Encoding');
        }
    }