vertx/src/main/java/eu/internetofus/common/vertx/ComponentClient.java
/**
   * Request and process the response.
   *
   * @param method    the HTTP method.
   * @param url       to request.
   * @param content   to send.
   * @param extractor function to obtain the
   *
   * @param <T>       type of model to receive.
   *
   * @return the future with the received model as response.
   */
Request and process the response.
@param method    the HTTP method.
@param url       to request.
@param content   to send.
@param extractor function to obtain the

@param        type of model to receive.

@return the future with the received model as response.
Request and process the response . @param method the HTTP method . @param url to request . @param content to send . @param extractor function to obtain the @param type of model to receive . @return the future with the received model as response .
protected <T> Future<T> request(final HttpMethod method, @NotNull final String url, final Buffer content,
      @NotNull final Function<HttpResponse<Buffer>, T> extractor) {
    final Promise<T> promise = Promise.promise();
    final var actionId = this.createActionId(method, url);
    Logger.trace("{} with {} STARTED", actionId, content);
    try {
      this.client.requestAbs(method, url).sendJson(content)
          .onSuccess(this.createHandlerThatExtractBodyFromSuccessResponse(extractor, promise, actionId))
          .onFailure(this.createRequestFailureHandler(promise, actionId));
    } catch (final Throwable throwable) {
      promise.tryFail(throwable);
    }
    return promise.future();
  }
protected < T > Future < T > request ( final HttpMethod method , @ NotNull final String url , final Buffer content , @ NotNull final Function < HttpResponse < Buffer > , T > extractor ) { final Promise < T > promise = Promise . promise ( ) ; final var actionId = this . createActionId ( method , url ) ; Logger . trace ( "{} with {} STARTED" , actionId , content ) ; try { this . client . requestAbs ( method , url ) . sendJson ( content ) . onSuccess ( this . createHandlerThatExtractBodyFromSuccessResponse ( extractor , promise , actionId ) ) . onFailure ( this . createRequestFailureHandler ( promise , actionId ) ) ; } catch ( final Throwable throwable ) { promise . tryFail ( throwable ) ; } return promise . future ( ) ; }
Request and process the response.
Request and process the response .