@@ -0,0 +1,1299 @@
+import org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport io.vertx.core.Vertx;%0Aimport io.vertx.core.buffer.Buffer;%0Aimport io.vertx.core.net.ProxyOptions;%0Aimport io.vertx.ext.unit.Async;%0Aimport io.vertx.ext.web.client.HttpResponse;%0Aimport io.vertx.ext.web.client.WebClient;%0Aimport io.vertx.ext.web.client.WebClientOptions;%0Aimport io.vertx.ext.unit.TestContext;%0Aimport io.vertx.ext.unit.junit.VertxUnitRunner;%0A%0A/**%0A * %0A */%0A%0A/**%0A * @author %3Ca href=%22https://oss.lehmann.cx/%22%3EAlexander Lehmann%3C/a%3E%0A *%0A */%0A@RunWith(VertxUnitRunner.class)%0Apublic class WebClientTest %7B%0A  @Test%0A  public void testWebClient(TestContext context) %7B%0A    Async async = context.async();%0A    Vertx vertx = Vertx.vertx();%0A    WebClientOptions options = new WebClientOptions();%0A    options.setProxyOptions(new ProxyOptions());%0A    WebClient client = WebClient.create(vertx, options);%0A    client%0A    .getAbs(%22ftp://ftp.gnu.org:21/gnu/%22)%0A    .send(ar -%3E %7B%0A      if (ar.succeeded()) %7B%0A        // Obtain response%0A        HttpResponse%3CBuffer%3E response = ar.result();%0A        System.out.println(%22Received response with status code%22 + response.statusCode());%0A        async.complete();%0A      %7D else %7B%0A        System.out.println(%22Something went wrong %22 + ar.cause().getMessage());%0A        context.fail(ar.cause());%0A      %7D%0A    %7D);%0A  %7D%0A%7D%0A

add example