Skip to content

Commit eb58ade

Browse files
committed
Merge branch '3.1.x'
Closes gh-36216
2 parents 0adf09b + 215763b commit eb58ade

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/rest-client.adoc

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ For example, to add BASIC authentication support, you can use `builder.basicAuth
1818

1919

2020

21+
[[io.rest-client.resttemplate.http-client]]
22+
==== RestTemplate HTTP Client
23+
Spring Boot will auto-detect which HTTP client to use with `RestTemplate` depending on the libraries available on the application classpath.
24+
In order of preference, the following clients are supported:
25+
26+
. Apache HttpClient
27+
. OkHttp
28+
. Simple JDK client (`HttpURLConnection`)
29+
30+
If multiple clients are available on the classpath, the most preferred client will be used.
31+
32+
33+
2134
[[io.rest-client.resttemplate.customization]]
2235
==== RestTemplate Customization
2336
There are three main approaches to `RestTemplate` customization, depending on how broadly you want the customizations to apply.
@@ -70,8 +83,15 @@ include::code:MyService[]
7083

7184
[[io.rest-client.webclient.runtime]]
7285
==== WebClient Runtime
73-
Spring Boot will auto-detect which `ClientHttpConnector` to use to drive `WebClient`, depending on the libraries available on the application classpath.
74-
For now, Reactor Netty, Jetty ReactiveStream client, Apache HttpClient, and the JDK's HttpClient are supported.
86+
Spring Boot will auto-detect which `ClientHttpConnector` to use to drive `WebClient` depending on the libraries available on the application classpath.
87+
In order of preference, the following clients are supported:
88+
89+
. Reactor Netty
90+
. Jetty RS client
91+
. Apache HttpClient
92+
. JDK HttpClient
93+
94+
If multiple clients are available on the classpath, the most preferred client will be used.
7595

7696
The `spring-boot-starter-webflux` starter depends on `io.projectreactor.netty:reactor-netty` by default, which brings both server and client implementations.
7797
If you choose to use Jetty as a reactive server instead, you should add a dependency on the Jetty Reactive HTTP client library, `org.eclipse.jetty:jetty-reactive-httpclient`.

0 commit comments

Comments
 (0)