Configuration.decompressHTTP()
Description
Appends a decompressHTTP filter to the current pipeline layout.
A decompressHTTP filter decompresses HTTP messages.
- INPUT - HTTP Messages to decompress.
- OUTPUT - Decompressed HTTP Messages.
This filter checks head.headers['content-encoding'] in the input MessageStart event. If its value is either of "gzip" or "br", the message body will be decompressed in the output.
You can also dynamically enable or disable the compression by giving a function to the enable parameter. Decompression will only happen when the function returns truthy.
Syntax
pipy().pipeline().decompressHTTP()pipy().pipeline().decompressHTTP(() => isEnabled())
Parameters
decompressHTTP()
Return Value
The same Configuration object.