接口的使用
org.springframework.http.client.reactive.ClientHttpConnector
使用ClientHttpConnector的程序包 程序包 说明 org.springframework.http.client.reactive Abstractions for reactive HTTP client support includingClientHttpRequest
andClientHttpResponse
as well as aClientHttpConnector
.org.springframework.test.web.reactive.server Support for testing Spring WebFlux server endpoints viaWebTestClient
.org.springframework.web.reactive.function.client Provides a reactiveWebClient
that builds on top of theorg.springframework.http.client.reactive
reactive HTTP adapter layer.org.springframework.http.client.reactive中ClientHttpConnector的使用
实现ClientHttpConnector的org.springframework.http.client.reactive中的类 修饰符和类型 类 说明 class
JettyClientHttpConnector
ClientHttpConnector
for the Jetty Reactive Streams HttpClient.class
ReactorClientHttpConnector
Reactor-Netty implementation ofClientHttpConnector
.org.springframework.test.web.reactive.server中ClientHttpConnector的使用
实现ClientHttpConnector的org.springframework.test.web.reactive.server中的类 修饰符和类型 类 说明 class
HttpHandlerConnector
Connector that handles requests by invoking anHttpHandler
rather than making actual requests to a network socket.参数类型为ClientHttpConnector的org.springframework.test.web.reactive.server中的方法 修饰符和类型 方法 说明 void
WebTestClientConfigurer. afterConfigurerAdded(WebTestClient.Builder builder, WebHttpHandlerBuilder httpHandlerBuilder, ClientHttpConnector connector)
Invoked once only, immediately (i.e. before this method returns).static WebTestClient.Builder
WebTestClient. bindToServer(ClientHttpConnector connector)
A variant ofWebTestClient.bindToServer()
with a pre-configured connector.org.springframework.web.reactive.function.client中ClientHttpConnector的使用
参数类型为ClientHttpConnector的org.springframework.web.reactive.function.client中的方法 修饰符和类型 方法 说明 WebClient.Builder
WebClient.Builder. clientConnector(ClientHttpConnector connector)
Configure theClientHttpConnector
to use.static ExchangeFunction
ExchangeFunctions. create(ClientHttpConnector connector)
Create anExchangeFunction
with the givenClientHttpConnector
.static ExchangeFunction
ExchangeFunctions. create(ClientHttpConnector connector, ExchangeStrategies strategies)
Create anExchangeFunction
with the givenClientHttpConnector
andExchangeStrategies
.