public interface HttpClientBuilder
HttpClient.| Modifier and Type | Method and Description |
|---|---|
HttpClient |
build()
Build and return the client.
|
HttpClientBuilder |
with(HttpClientOptions options)
Configure the client options.
|
HttpClientBuilder |
with(PoolOptions options)
Configure the client with the given pool
options. |
HttpClientBuilder |
withConnectHandler(Handler<HttpConnection> handler)
Set a connection handler for the client.
|
HttpClientBuilder |
withRedirectHandler(java.util.function.Function<HttpClientResponse,Future<RequestOptions>> handler)
Set a redirect handler for the http client.
|
HttpClientBuilder with(HttpClientOptions options)
options - the client optionsHttpClientBuilder with(PoolOptions options)
options.options - the pool optionsHttpClientBuilder withConnectHandler(Handler<HttpConnection> handler)
HttpClientBuilder withRedirectHandler(java.util.function.Function<HttpClientResponse,Future<RequestOptions>> handler)
The redirect handler is called when a 3xx response is received and the request is configured to
follow redirects with HttpClientRequest.setFollowRedirects(boolean).
The redirect handler is passed the HttpClientResponse, it can return an HttpClientRequest or null.
Future<HttpClientRequest> is returned, the client will send this new request
The handler must return a Future<HttpClientRequest> unsent so the client can further configure it and send it.
handler - the new redirect handlerHttpClient build()
Copyright © 2025 Eclipse. All rights reserved.