See gh-43498
This commit is contained in:
Johnny Lim
2024-12-13 23:40:38 +09:00
committed by Phillip Webb
parent e62bda9c04
commit 4d15ee5bf0
12 changed files with 52 additions and 50 deletions

View File

@@ -209,8 +209,8 @@ If multiple clients are available on the classpath, and not global configuration
[[io.rest-client.clienthttprequestfactory.configuration]]
=== Global HTTP Client Configuration
If the the auto-detected HTTP client does not meet your needs, you can use the configprop:spring.http.client.factory[] property to pick a specific factory.
For example, if you have Apache HttpClient on your classpath, but you prefer Jetty's javadoc:org.eclipse.jetty.client.HttpClient[] you can add use the following:
If the auto-detected HTTP client does not meet your needs, you can use the configprop:spring.http.client.factory[] property to pick a specific factory.
For example, if you have Apache HttpClient on your classpath, but you prefer Jetty's javadoc:org.eclipse.jetty.client.HttpClient[] you can add the following:
[configprops,yaml]
----

View File

@@ -10,7 +10,7 @@ import java.net.http.HttpClient
class MyClientHttpConfiguration {
@Bean
fun clientHttpRequestFactoryBuilder(proxySelector: ProxySelector): ClientHttpRequestFactoryBuilder<*>? {
fun clientHttpRequestFactoryBuilder(proxySelector: ProxySelector): ClientHttpRequestFactoryBuilder<*> {
return ClientHttpRequestFactoryBuilder.jdk()
.withHttpClientCustomizer { builder -> builder.proxy(proxySelector) }
}