Example usage for io.vertx.core.http HttpClient put

List of usage examples for io.vertx.core.http HttpClient put

Introduction

In this page you can find the example usage for io.vertx.core.http HttpClient put.

Prototype

HttpClientRequest put(String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler);

Source Link

Document

Create an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive the response

Usage

From source file:examples.HTTPExamples.java

License:Open Source License

public void example50(HttpClient client) {

    HttpClientRequest request = client.put("some-uri", response -> {
        System.out.println("Received response with status code " + response.statusCode());
    });/* ww  w .  j  a v a 2 s  .  co  m*/

    request.putHeader("Expect", "100-Continue");

    request.continueHandler(v -> {
        // OK to send rest of body
        request.write("Some data");
        request.write("Some more data");
        request.end();
    });
}