Closed
Description
static HttpClientContext initClientWithRetry() {
return HttpClientContext.newBuilder()
.withBaseUrl("http://localhost:8887")
.withBodyAdapter(new JacksonBodyAdapter(new ObjectMapper()))
.withRequestListener(new RequestLogger())
.withRetryHandler(new SimpleRetryHandler(4, 1))
.build();
}
With SimpleRetryHandler
constructed with max number of attempts and linear backoff in millis.