From 9f5db2d1aaca0c93e0760c63b5da1512ef455a3f Mon Sep 17 00:00:00 2001 From: yhirose Date: Sat, 25 Jul 2020 20:53:38 -0400 Subject: [PATCH] Updated README --- README.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aab3c07..0348c11 100644 --- a/README.md +++ b/README.md @@ -529,20 +529,27 @@ cli.set_ca_cert_path("./ca-bundle.crt"); cli.enable_server_certificate_verification(true); ``` -Zlib Support ------------- +Compression +----------- -'gzip' compression is available with `CPPHTTPLIB_ZLIB_SUPPORT`. `libz` should be linked. +The server can applie compression to the following MIME type contents: -The server applies gzip compression to the following MIME type contents: - - * all text types + * all text types except text/event-stream * image/svg+xml * application/javascript * application/json * application/xml * application/xhtml+xml +### Zlib Support + +'gzip' compression is available with `CPPHTTPLIB_ZLIB_SUPPORT`. `libz` should be linked. + +### Brotli Support + +Brotli compression is available with `CPPHTTPLIB_BROTLI_SUPPORT`. Necessary libraries should be linked. +Please see https://github.com/google/brotli for more detail. + ### Compress request body on client ```c++ @@ -554,7 +561,7 @@ res = cli.Post("/resource/foo", "...", "text/plain"); ```c++ cli.set_decompress(false); -res = cli.Get("/resource/foo", {{"Accept-Encoding", "gzip, deflate"}}); +res = cli.Get("/resource/foo", {{"Accept-Encoding", "gzip, deflate, br"}}); res->body; // Compressed data ```