|
|
|
@ -2,18 +2,18 @@ |
|
|
|
= WebClient |
|
|
|
= WebClient |
|
|
|
:page-section-summary-toc: 1 |
|
|
|
:page-section-summary-toc: 1 |
|
|
|
|
|
|
|
|
|
|
|
Spring WebFlux includes a client to perform HTTP requests with. `WebClient` has a |
|
|
|
Spring WebFlux includes a client to perform HTTP requests. `WebClient` has a |
|
|
|
functional, fluent API based on Reactor, see xref:web/webflux-reactive-libraries.adoc[Reactive Libraries], |
|
|
|
functional, fluent API based on Reactor (see xref:web/webflux-reactive-libraries.adoc[Reactive Libraries]) |
|
|
|
which enables declarative composition of asynchronous logic without the need to deal with |
|
|
|
which enables declarative composition of asynchronous logic without the need to deal with |
|
|
|
threads or concurrency. It is fully non-blocking, it supports streaming, and relies on |
|
|
|
threads or concurrency. It is fully non-blocking, supports streaming, and relies on |
|
|
|
the same xref:web/webflux/reactive-spring.adoc#webflux-codecs[codecs] that are also used to encode and |
|
|
|
the same xref:web/webflux/reactive-spring.adoc#webflux-codecs[codecs] that are also used to encode and |
|
|
|
decode request and response content on the server side. |
|
|
|
decode request and response content on the server side. |
|
|
|
|
|
|
|
|
|
|
|
`WebClient` needs an HTTP client library to perform requests with. There is built-in |
|
|
|
`WebClient` needs an HTTP client library to perform requests. There is built-in |
|
|
|
support for the following: |
|
|
|
support for the following: |
|
|
|
|
|
|
|
|
|
|
|
* {reactor-github-org}/reactor-netty[Reactor Netty] |
|
|
|
* {reactor-github-org}/reactor-netty[Reactor Netty] |
|
|
|
* {java-api}/java.net.http/java/net/http/HttpClient.html[JDK HttpClient] |
|
|
|
* {java-api}/java.net.http/java/net/http/HttpClient.html[JDK HttpClient] |
|
|
|
* https://github.com/jetty-project/jetty-reactive-httpclient[Jetty Reactive HttpClient] |
|
|
|
* https://github.com/jetty-project/jetty-reactive-httpclient[Jetty Reactive HttpClient] |
|
|
|
* https://hc.apache.org/index.html[Apache HttpComponents] |
|
|
|
* https://hc.apache.org/index.html[Apache HttpComponents] |
|
|
|
* Others can be plugged via `ClientHttpConnector`. |
|
|
|
* Others can be plugged in via `ClientHttpConnector`. |
|
|
|
|