Configuration.compressHTTP()
Description
Appends a compressHTTP filter to the current pipeline layout.
A compressHTTP filter compresses HTTP messages.
- INPUT - HTTP Messages to compress.
- OUTPUT - Compressed HTTP Messages.
Syntax
pipy().pipeline().compressHTTP({method: 'gzip',level: 'default'})
Parameters
compressHTTP(options?)
options?
Options including:
- method - Compression method or a function that returns the compression method. Available compression methods are "deflate", "gzip" and "" for no compression. Default is "".
- level - Compression level or a function that returns the compression level. Available compression levels are "default", "speed" and "best". Default is "default".
Return Value
The same Configuration object.