Search in sources :

Example 6 with HttpRequest

use of io.vertx.ext.web.client.HttpRequest in project vertx-web by vert-x3.

the class ApiClient method cookieFormExplodeString.

/**
 * Call cookie_form_explode_string with empty body.
 * @param color Parameter color inside cookie
 * @param handler The handler for the asynchronous request
 */
public void cookieFormExplodeString(String color, Handler<AsyncResult<HttpResponse>> handler) {
    // Check required params
    if (color == null)
        throw new RuntimeException("Missing parameter color");
    // Generate the uri
    String uri = "/cookie/form/explode/string";
    HttpRequest request = client.get(uri);
    MultiMap requestCookies = MultiMap.caseInsensitiveMultiMap();
    if (color != null)
        this.renderCookieParam("color", color, requestCookies);
    this.renderAndAttachCookieHeader(request, requestCookies);
    request.send(handler);
}
Also used : HttpRequest(io.vertx.ext.web.client.HttpRequest) MultiMap(io.vertx.core.MultiMap)

Example 7 with HttpRequest

use of io.vertx.ext.web.client.HttpRequest in project vertx-web by vert-x3.

the class ApiClient method queryFormNoexplodeEmpty.

/**
 * Call query_form_noexplode_empty with empty body.
 * @param color Parameter color inside query
 * @param handler The handler for the asynchronous request
 */
public void queryFormNoexplodeEmpty(String color, Handler<AsyncResult<HttpResponse>> handler) {
    // Check required params
    if (color == null)
        throw new RuntimeException("Missing parameter color");
    // Generate the uri
    String uri = "/query/form/noexplode/empty";
    HttpRequest request = client.get(uri);
    MultiMap requestCookies = MultiMap.caseInsensitiveMultiMap();
    if (color != null)
        this.addQueryParam("color", color, request);
    this.renderAndAttachCookieHeader(request, requestCookies);
    request.send(handler);
}
Also used : HttpRequest(io.vertx.ext.web.client.HttpRequest) MultiMap(io.vertx.core.MultiMap)

Example 8 with HttpRequest

use of io.vertx.ext.web.client.HttpRequest in project vertx-web by vert-x3.

the class ApiClient method cookieFormNoexplodeEmpty.

/**
 * Call cookie_form_noexplode_empty with empty body.
 * @param color Parameter color inside cookie
 * @param handler The handler for the asynchronous request
 */
public void cookieFormNoexplodeEmpty(String color, Handler<AsyncResult<HttpResponse>> handler) {
    // Check required params
    if (color == null)
        throw new RuntimeException("Missing parameter color");
    // Generate the uri
    String uri = "/cookie/form/noexplode/empty";
    HttpRequest request = client.get(uri);
    MultiMap requestCookies = MultiMap.caseInsensitiveMultiMap();
    if (color != null)
        this.renderCookieParam("color", color, requestCookies);
    this.renderAndAttachCookieHeader(request, requestCookies);
    request.send(handler);
}
Also used : HttpRequest(io.vertx.ext.web.client.HttpRequest) MultiMap(io.vertx.core.MultiMap)

Example 9 with HttpRequest

use of io.vertx.ext.web.client.HttpRequest in project vertx-web by vert-x3.

the class ApiClient method queryFormExplodeString.

/**
 * Call query_form_explode_string with empty body.
 * @param color Parameter color inside query
 * @param handler The handler for the asynchronous request
 */
public void queryFormExplodeString(String color, Handler<AsyncResult<HttpResponse>> handler) {
    // Check required params
    if (color == null)
        throw new RuntimeException("Missing parameter color");
    // Generate the uri
    String uri = "/query/form/explode/string";
    HttpRequest request = client.get(uri);
    MultiMap requestCookies = MultiMap.caseInsensitiveMultiMap();
    if (color != null)
        this.addQueryParam("color", color, request);
    this.renderAndAttachCookieHeader(request, requestCookies);
    request.send(handler);
}
Also used : HttpRequest(io.vertx.ext.web.client.HttpRequest) MultiMap(io.vertx.core.MultiMap)

Example 10 with HttpRequest

use of io.vertx.ext.web.client.HttpRequest in project vertx-web by vert-x3.

the class ApiClient method queryPipeDelimitedNoexplodeObject.

/**
 * Call query_pipeDelimited_noexplode_object with empty body.
 * @param color Parameter color inside query
 * @param handler The handler for the asynchronous request
 */
public void queryPipeDelimitedNoexplodeObject(Map<String, Object> color, Handler<AsyncResult<HttpResponse>> handler) {
    // Check required params
    if (color == null)
        throw new RuntimeException("Missing parameter color");
    // Generate the uri
    String uri = "/query/pipeDelimited/noexplode/object";
    HttpRequest request = client.get(uri);
    MultiMap requestCookies = MultiMap.caseInsensitiveMultiMap();
    if (color != null)
        this.addQueryObjectPipeDelimited("color", color, request);
    this.renderAndAttachCookieHeader(request, requestCookies);
    request.send(handler);
}
Also used : HttpRequest(io.vertx.ext.web.client.HttpRequest) MultiMap(io.vertx.core.MultiMap)

Aggregations

HttpRequest (io.vertx.ext.web.client.HttpRequest)53 MultiMap (io.vertx.core.MultiMap)52 AsyncResult (io.vertx.core.AsyncResult)5 Buffer (io.vertx.core.buffer.Buffer)5 HttpResponse (io.vertx.ext.web.client.HttpResponse)5 WebClient (io.vertx.ext.web.client.WebClient)5 Truth.assertThat (com.google.common.truth.Truth.assertThat)4 MqttQoS (io.netty.handler.codec.mqtt.MqttQoS)4 Span (io.opentracing.Span)4 Future (io.vertx.core.Future)4 Handler (io.vertx.core.Handler)4 HttpHeaders (io.vertx.core.http.HttpHeaders)4 VertxExtension (io.vertx.junit5.VertxExtension)4 VertxTestContext (io.vertx.junit5.VertxTestContext)4 MqttEndpoint (io.vertx.mqtt.MqttEndpoint)4 MqttPublishMessage (io.vertx.mqtt.messages.MqttPublishMessage)4 HttpURLConnection (java.net.HttpURLConnection)4 URLEncoder (java.net.URLEncoder)4 StandardCharsets (java.nio.charset.StandardCharsets)4 Map (java.util.Map)4