All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.groovy.ext.web.client.HttpRequest_GroovyExtension Maven / Gradle / Ivy

There is a newer version: 3.6.3
Show newest version
package io.vertx.groovy.ext.web.client;
public class HttpRequest_GroovyExtension {
  public static void sendJsonObject(io.vertx.ext.web.client.HttpRequest j_receiver, java.util.Map body, io.vertx.core.Handler>> handler) {
    j_receiver.sendJsonObject(body != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(body) : null,
      handler != null ? new io.vertx.core.Handler>>() {
      public void handle(io.vertx.core.AsyncResult> ar) {
        handler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static void sendJson(io.vertx.ext.web.client.HttpRequest j_receiver, java.lang.Object body, io.vertx.core.Handler>> handler) {
    j_receiver.sendJson(io.vertx.core.impl.ConversionHelper.toObject(body),
      handler != null ? new io.vertx.core.Handler>>() {
      public void handle(io.vertx.core.AsyncResult> ar) {
        handler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
}