- 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 interfaceDeprecated.Builds the HttpClientContext.static interfaceDeprecated.Statistic metrics collected to provide an overview of activity of this client. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientContext.Builderbuilder()Deprecated.static HttpClientContext.BuilderDeprecated.Methods inherited from interface io.avaje.http.client.HttpClient
bodyAdapter, converters, create, metrics, metrics, request
-
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().
-