@Override
                    public void onComplete(Result result) {
                        log.log(Level.FINER, () ->
                                String.format("Completed request %s (%s): %s",
                                        req, System.identityHashCode(vessel),
                                        result.isFailed()
                                                ? result.getFailure().toString() : result.getResponse().getStatus()));
                        endpoint.inflight.decrementAndGet();
                        if (result.isFailed()) {
                            if (result.getFailure() instanceof RetryableRequestException)
                                // Request can be safely retried as it was cancelled locally
                                // https://github.com/jetty/jetty.project/issues/13131
                                vessel.completeExceptionally(new RetryableException(result.getFailure()));
                            else
                                vessel.completeExceptionally(result.getFailure());
                        }
                        else vessel.complete(new JettyResponse(result.getResponse(), getContent()));
                    }
Client implementation based on Jetty HTTP Client

@author bjorncs
vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/JettyCluster.java