Browse Source

Updated README

yhirose 5 years ago
parent
commit
9f5db2d1aa
1 changed files with 14 additions and 7 deletions
  1. 14 7
      README.md

+ 14 - 7
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 applies gzip compression to the following MIME type contents:
+The server can applie 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
 ```