class VertxHttpClient<F extends io.fabric8.kubernetes.client.http.HttpClient.Factory>
    extends StandardHttpClient<VertxHttpClient<F>, F, VertxHttpClientBuilder<F>> {
  private final Vertx vertx;
  private final HttpClient client;

  VertxHttpClient(VertxHttpClientBuilder<F> vertxHttpClientBuilder, HttpClient client, AtomicBoolean closed) {
    super(vertxHttpClientBuilder, closed);
    this.vertx = vertxHttpClientBuilder.vertx;
    this.client = client;
  }

  HttpClient getClient() {
    return client;
  }

  @Override
  public CompletableFuture<WebSocketResponse> buildWebSocketDirect(StandardWebSocketBuilder standardWebSocketBuilder,
      WebSocket.Listener listener) {<FILL_FUNCTION_BODY>}

  @Override
  public CompletableFuture<HttpResponse<AsyncBody>> consumeBytesDirect(StandardHttpRequest request,
      AsyncBody.Consumer<List<ByteBuffer>> consumer) {

    RequestOptions options = new RequestOptions();

    request.headers().forEach((k, l) -> l.forEach(v -> options.addHeader(k, v)));
    options.setAbsoluteURI(request.uri().toString());
    options.setMethod(HttpMethod.valueOf(request.method()));

    if (request.getTimeout() != null) {
      options.setTimeout(request.getTimeout().toMillis());
    }

    Optional.ofNullable(request.getContentType())
        .ifPresent(s -> options.putHeader(io.vertx.core.http.HttpHeaders.CONTENT_TYPE, s));

    if (request.isExpectContinue()) {
      // TODO: determine if this is enforced by the client
      // seems like a continue handler is needed
      options.putHeader(io.vertx.core.http.HttpHeaders.EXPECT, io.vertx.core.http.HttpHeaders.CONTINUE);
    }

    return new VertxHttpRequest(vertx, options, request).consumeBytes(this.client, consumer);
  }

  @Override
  public void doClose() {
    client.close();
  }

}

    WebSocketConnectOptions options = new WebSocketConnectOptions();

    if (standardWebSocketBuilder.getSubprotocol() != null) {
      options.setSubProtocols(Collections.singletonList(standardWebSocketBuilder.getSubprotocol()));
    }

    final StandardHttpRequest request = standardWebSocketBuilder.asHttpRequest();

    if (request.getTimeout() != null) {
      options.setTimeout(request.getTimeout().toMillis());
    }

    request.headers().entrySet().stream()
        .forEach(e -> e.getValue().stream().forEach(v -> options.addHeader(e.getKey(), v)));
    options.setAbsoluteURI(WebSocket.toWebSocketUri(request.uri()).toString());

    CompletableFuture<WebSocketResponse> response = new CompletableFuture<>();

    client
        .webSocket(options)
        .onSuccess(ws -> {
          VertxWebSocket ret = new VertxWebSocket(ws, listener);
          ret.init();
          response.complete(new WebSocketResponse(new WebSocketUpgradeResponse(request), ret));
        }).onFailure(t -> {
          if (t instanceof UpgradeRejectedException) {
            UpgradeRejectedException handshake = (UpgradeRejectedException) t;
            final WebSocketUpgradeResponse upgradeResponse = new WebSocketUpgradeResponse(
                request, handshake.getStatus(), toHeadersMap(handshake.getHeaders()));
            response.complete(new WebSocketResponse(upgradeResponse, handshake));
          }
          response.completeExceptionally(t);
        });
    return response;
  
<methods>public abstract CompletableFuture<io.fabric8.kubernetes.client.http.WebSocketResponse> buildWebSocketDirect(io.fabric8.kubernetes.client.http.StandardWebSocketBuilder, io.fabric8.kubernetes.client.http.WebSocket.Listener) ,public final void close() ,public CompletableFuture<HttpResponse<io.fabric8.kubernetes.client.http.AsyncBody>> consumeBytes(io.fabric8.kubernetes.client.http.HttpRequest, Consumer<List<java.nio.ByteBuffer>>) ,public abstract CompletableFuture<HttpResponse<io.fabric8.kubernetes.client.http.AsyncBody>> consumeBytesDirect(io.fabric8.kubernetes.client.http.StandardHttpRequest, Consumer<List<java.nio.ByteBuffer>>) ,public java.util.concurrent.atomic.AtomicBoolean getClosed() ,public V getTag(Class<V>) ,public boolean isClosed() ,public io.fabric8.kubernetes.client.http.HttpClient.DerivedClientBuilder newBuilder() ,public io.fabric8.kubernetes.client.http.HttpRequest.Builder newHttpRequestBuilder() ,public io.fabric8.kubernetes.client.http.WebSocket.Builder newWebSocketBuilder() ,public CompletableFuture<HttpResponse<V>> sendAsync(io.fabric8.kubernetes.client.http.HttpRequest, Class<V>) <variables>private static final Logger LOG,private static final long MAX_ADDITIONAL_REQUEST_TIMEOUT,protected StandardHttpClientBuilder<VertxHttpClient<F>,F,VertxHttpClientBuilder<F>> builder,protected java.util.concurrent.atomic.AtomicBoolean closed