WebClient
Spring WebFlux 包括了一个用来执行 HTTP 请求的客户端。WebClient
有一个基于 Reactor 的函数式流畅 API,请参阅 Reactive Libraries,它支持声明式异步逻辑组合,而无需处理线程或并发。它完全是非阻塞的,它支持流,并且依赖于与服务器端对请求和响应内容进行编码和解码的相同 codecs。
Spring WebFlux includes a client to perform HTTP requests with. WebClient
has a
functional, fluent API based on Reactor, see Reactive Libraries,
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
the same codecs that are also used to encode and
decode request and response content on the server side.
`WebClient`需要一个 HTTP 客户端库来执行请求。以下内容具有内置支持:
WebClient
needs an HTTP client library to perform requests with. There is built-in
support for the following:
-
Others can be plugged via
ClientHttpConnector
.