Package io.avaje.http.client
Interface HttpClientContext.Builder
-
- Enclosing interface:
- HttpClientContext
public static interface HttpClientContext.Builder
Builds the HttpClientContext.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HttpClientContext
build()
Build and return the context.HttpClientContext.Builder
with(HttpClient client)
Set the underlying HttpClient to use.HttpClientContext.Builder
withBaseUrl(String baseUrl)
Set the base URL to use for requests created from the context.HttpClientContext.Builder
withBodyAdapter(BodyAdapter adapter)
Set the body adapter to use to convert beans to body content and response content back to beans.HttpClientContext.Builder
withRequestListener(RequestListener requestListener)
HttpClientContext.Builder
withRequestTimeout(Duration requestTimeout)
Set the default request timeout.
-
-
-
Method Detail
-
with
HttpClientContext.Builder with(HttpClient client)
Set the underlying HttpClient to use.
-
withBaseUrl
HttpClientContext.Builder withBaseUrl(String baseUrl)
Set the base URL to use for requests created from the context.
-
withRequestTimeout
HttpClientContext.Builder withRequestTimeout(Duration requestTimeout)
Set the default request timeout.
-
withBodyAdapter
HttpClientContext.Builder withBodyAdapter(BodyAdapter adapter)
Set the body adapter to use to convert beans to body content and response content back to beans.
-
withRequestListener
HttpClientContext.Builder withRequestListener(RequestListener requestListener)
-
build
HttpClientContext build()
Build and return the context.
-
-