Class HttpClientBuilder
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
HttpClient.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientBuilder(HttpClientBuilder delegate) HttpClientBuilder(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return the client.booleaninthashCode()static HttpClientBuildertoString()with(HttpClientConfig config) Configure the client.with(HttpClientOptions options) Configure the client options.with(PoolOptions options) Configure the client with the given pooloptions.with(ClientSSLOptions options) Configure the client with the given SSLoptions.with(SSLEngineOptions engine) Configure the client with the given SSLengine.withAddressResolver(AddressResolver<?> resolver) Configure the client to use a specific address resolver.withConnectHandler(Handler<HttpConnection> handler) Set a connection handler for the client.withLoadBalancer(LoadBalancer loadBalancer) Configure the client to use a load balancer.Set a redirect handler for the http client.Set a redirect handler for the http client.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HttpClientBuilder
-
HttpClientBuilder
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
with
Configure the client options.- Parameters:
options- the client options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client.- Parameters:
config- the client config- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client with the given pooloptions.- Parameters:
options- the pool options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client with the given SSLoptions.- Parameters:
options- the SSL options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client with the given SSLengine.- Parameters:
engine- the SSL engine options- Returns:
- a reference to this, so the API can be used fluently
-
withConnectHandler
Set a connection handler for the client. This handler is called when a new connection is established.- Parameters:
handler-- Returns:
- a reference to this, so the API can be used fluently
-
withRedirectHandler
public HttpClientBuilder withRedirectHandler(Function<HttpClientResponse, Future<RequestOptions>> handler) Set a redirect handler for the http client.The redirect handler is called when a
3xxresponse is received and the request is configured to follow redirects withHttpClientRequest.setFollowRedirects(boolean).The redirect handler is passed the
HttpClientResponse, it can return anHttpClientRequestornull.- when null is returned, the original response is processed by the original request response handler
- when a new
Futureis returned, the client will send this new request
The handler must return a
Futureunsent so the client can further configure it and send it.- Parameters:
handler- the new redirect handler- Returns:
- a reference to this, so the API can be used fluently
-
withRedirectHandler
public HttpClientBuilder withRedirectHandler(Function<HttpClientResponse, Single<RequestOptions>> handler) Set a redirect handler for the http client.The redirect handler is called when a
3xxresponse is received and the request is configured to follow redirects withHttpClientRequest.setFollowRedirects(boolean).The redirect handler is passed the
HttpClientResponse, it can return anHttpClientRequestornull.- when null is returned, the original response is processed by the original request response handler
- when a new
Futureis returned, the client will send this new request
The handler must return a
Futureunsent so the client can further configure it and send it.- Parameters:
handler- the new redirect handler- Returns:
- a reference to this, so the API can be used fluently
-
build
Build and return the client.- Returns:
- the client as configured by this builder
-
withAddressResolver
Configure the client to use a specific address resolver.- Parameters:
resolver- the address resolver- Returns:
-
withLoadBalancer
Configure the client to use a load balancer.- Parameters:
loadBalancer- the load balancer- Returns:
-
newInstance
-