- All Superinterfaces:
HttpClient
Deprecated.
Deprecated in favor of
HttpClient
.
Migrate to using HttpClient.builder()
.
The HTTP client context that we use to build and process requests.
HttpClientContext ctx = HttpClientContext.builder()
.baseUrl("http://localhost:8080")
.bodyAdapter(new JacksonBodyAdapter())
.build();
HelloDto dto = ctx.request()
.path("hello")
.queryParam("name", "Rob")
.queryParam("say", "Whats up")
.GET()
.bean(HelloDto.class);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Deprecated.Builds the HttpClientContext.static interface
Deprecated.Statistic metrics collected to provide an overview of activity of this client.Nested classes/interfaces inherited from interface io.avaje.http.client.HttpClient
HttpClient.GeneratedComponent
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientContext.Builder
builder()
Deprecated.static HttpClientContext.Builder
Deprecated.Methods inherited from interface io.avaje.http.client.HttpClient
bodyAdapter, create, metrics, metrics, request, url
-
Method Details
-
builder
Deprecated.Deprecated - migrate toHttpClient.builder()
.Return the builder to config and build the client context.
HttpClientContext ctx = HttpClientContext.builder() .baseUrl("http://localhost:8080") .bodyAdapter(new JacksonBodyAdapter()) .build(); HttpResponse<String> res = ctx.request() .path("hello") .GET().asString();
-
newBuilder
Deprecated.Deprecated - migrate to builder().
-