List of usage examples for io.vertx.core.http HttpClient getNow
@Fluent default HttpClient getNow(int port, String host, String requestURI, Handler<AsyncResult<HttpClientResponse>> responseHandler)
From source file:examples.HTTPExamples.java
License:Open Source License
public void example31(Vertx vertx) { HttpClient client = vertx.createHttpClient(); // Specify both port and host name client.getNow(8080, "myserver.mycompany.com", "/some-uri", response -> { System.out.println("Received response with status code " + response.statusCode()); });/*from w w w .ja v a 2 s . c o m*/ // This time use the default port 80 but specify the host name client.getNow("foo.othercompany.com", "/other-uri", response -> { System.out.println("Received response with status code " + response.statusCode()); }); }