Spring Web Reactive | 2. WebClient
Spring WebFlux includes a client for performing HTTP requests. WebClient has an API based on Reactor functions. See Reactive Libraries. This enables declarative composition of asynchronous logic without having to manage threads and concurrency directly. It is fully non-blocking, supports streaming, and relies on the codecs used to encode and decode request and response content on the server side.
WebClient requires an HTTP client library to execute requests. The following options are supported:
- Reactor Netty
- Jetty Reactive HttpClient
- Apache HttpComponents
- Others can be connected through
ClientHttpConnector.