类 ReactorHttpClientBuilder
java.lang.Object
org.springframework.boot.http.client.ReactorHttpClientBuilder
Builder that can be used to create a Rector Netty
HttpClient.- 从以下版本开始:
- 3.5.0
- 作者:
- Phillip Webb, Andy Wilkinson, Scott Frederick
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明reactor.netty.http.client.HttpClientbuild(HttpClientSettings settings) Build a newHttpClientinstance with the given settings applied.withHttpClientCustomizer(UnaryOperator<reactor.netty.http.client.HttpClient> customizer) Return a newReactorHttpClientBuilderthat applies additional customization to the underlyingHttpClient.withHttpClientFactory(Supplier<reactor.netty.http.client.HttpClient> factory) Return a newReactorHttpClientBuilderthat uses the given factory to create theHttpClient.withReactorResourceFactory(ReactorResourceFactory reactorResourceFactory) Return a newReactorHttpClientBuilderthat uses the givenReactorResourceFactoryto create theHttpClient.
-
构造器详细资料
-
ReactorHttpClientBuilder
public ReactorHttpClientBuilder()
-
-
方法详细资料
-
withReactorResourceFactory
public ReactorHttpClientBuilder withReactorResourceFactory(ReactorResourceFactory reactorResourceFactory) Return a newReactorHttpClientBuilderthat uses the givenReactorResourceFactoryto create theHttpClient.- 参数:
reactorResourceFactory- theReactorResourceFactoryto use- 返回:
- a new
ReactorHttpClientBuilderinstance
-
withHttpClientFactory
public ReactorHttpClientBuilder withHttpClientFactory(Supplier<reactor.netty.http.client.HttpClient> factory) Return a newReactorHttpClientBuilderthat uses the given factory to create theHttpClient.- 参数:
factory- the factory to use- 返回:
- a new
ReactorHttpClientBuilderinstance
-
withHttpClientCustomizer
public ReactorHttpClientBuilder withHttpClientCustomizer(UnaryOperator<reactor.netty.http.client.HttpClient> customizer) Return a newReactorHttpClientBuilderthat applies additional customization to the underlyingHttpClient.- 参数:
customizer- the customizer to apply- 返回:
- a new
ReactorHttpClientBuilderinstance
-
build
Build a newHttpClientinstance with the given settings applied.- 参数:
settings- the settings to apply- 返回:
- a new
HttpClientinstance
-