From fe461688d5f6fece15e65b7705bc45ceabe6b7a3 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Mon, 15 Jul 2024 19:09:30 +0900 Subject: [PATCH 1/2] Polish Javadoc for HttpClient.compress() --- .../src/main/java/reactor/netty/http/client/HttpClient.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java b/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java index 515bc6c6f0..f628aef986 100644 --- a/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java +++ b/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java @@ -516,9 +516,11 @@ public final HttpClient baseUrl(String baseUrl) { } /** - * Specifies whether GZip compression is enabled. + * Specifies whether compression (gzip, Brotli, and zstd) is enabled. * - * @param compressionEnabled if true GZip compression is enabled otherwise disabled (default: false) + *

Note: Brotli and zstd compressions require additional dependencies. + * + * @param compressionEnabled if true, compression (gzip, Brotli, and zstd) is enabled, otherwise disabled (default: false) * @return a new {@link HttpClient} */ public final HttpClient compress(boolean compressionEnabled) { From b91b30bb9adfe4c2557818a2bc13a886cd20ef23 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 16 Jul 2024 00:37:59 +0900 Subject: [PATCH 2/2] Add note for zstd compression --- .../src/main/java/reactor/netty/http/client/HttpClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java b/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java index f628aef986..e090d1882f 100644 --- a/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java +++ b/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java @@ -520,6 +520,8 @@ public final HttpClient baseUrl(String baseUrl) { * *

Note: Brotli and zstd compressions require additional dependencies. * + *

Note: For zstd compression, {@literal Accept-Encoding: zstd} header needs to be added explicitly. + * * @param compressionEnabled if true, compression (gzip, Brotli, and zstd) is enabled, otherwise disabled (default: false) * @return a new {@link HttpClient} */