File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 4949import java .time .Duration ;
5050import java .util .List ;
5151import java .util .Optional ;
52+ import java .util .function .UnaryOperator ;
5253
5354import static com .fasterxml .jackson .annotation .JsonInclude .Include .NON_NULL ;
5455import static io .netty .channel .ChannelOption .CONNECT_TIMEOUT_MILLIS ;
@@ -102,9 +103,11 @@ public Integer getConnectionPoolSize() {
102103 @ Override
103104 @ Value .Default
104105 public HttpClient getHttpClient () {
105- return createHttpClient ().compress (true )
106+ HttpClient client = createHttpClient ().compress (true )
106107 .tcpConfiguration (this ::configureTcpClient )
107108 .secure (this ::configureSsl );
109+ return getAdditionalHttpClientConfiguration ().map (configuration -> configuration .apply (client ))
110+ .orElse (client );
108111 }
109112
110113 @ Override
@@ -221,6 +224,11 @@ Optional<SslCertificateTruster> getSslCertificateTruster() {
221224 * The timeout for the SSL handshake negotiation
222225 */
223226 abstract Optional <Duration > getSslHandshakeTimeout ();
227+
228+ /**
229+ * Additional configuration to the underlying HttpClient
230+ */
231+ abstract Optional <UnaryOperator <HttpClient >> getAdditionalHttpClientConfiguration ();
224232
225233 @ Value .Derived
226234 LoopResources getThreadPool () {
You can’t perform that action at this time.
0 commit comments