Class: CompressionMiddleware
Class: CompressionMiddleware
Kernel Middleware to compress response content based on the Accept-Encoding header.
Constructors
Constructor
new CompressionMiddleware(): CompressionMiddleware;
Returns
CompressionMiddleware
Methods
handle()
handle(event, next): Promise<OutgoingHttpResponse>;
Compress the response content based on the Accept-Encoding header.
Parameters
event
The incoming HTTP event.
next
NextMiddleware
<IncomingHttpEvent
, OutgoingHttpResponse
>
The next middleware in the pipeline.
Returns
Promise
<OutgoingHttpResponse
>
The outgoing HTTP response.