Function enableBrotli

Synopsis

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

virtual HttpAppFramework & enableBrotli(bool useBrotli)=0

Description

Enable brotli compression.

Parameters:

useBrotli - if the parameter is true, use brotli 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 brotli is enabled, brotli 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 892 in lib/inc/drogon/HttpAppFramework.h.






Add Discussion as Guest

Log in to DocsForge