Function enableGzip

Synopsis

#include <lib/inc/drogon/HttpAppFramework.h>

virtual HttpAppFramework & enableGzip(bool useGzip)=0

Description

Enable gzip compression.

Parameters:

useGzip - if the parameter is true, use gzip to compress the response body's content; The default value is true.

Note
This operation can be performed by an option in the configuration file. After gzip is enabled, gzip is used under the following conditions:
  1. The content type of response is not a binary type.
  2. The content length is bigger than 1024 bytes.

Source

Line 858 in lib/inc/drogon/HttpAppFramework.h.






Add Discussion as Guest

Log in to DocsForge