OkapiClient { public void request(HttpMethod method, String path, String data, Handler<ExtendedAsyncResult<String>> fut) { request(method, path, Buffer.buffer(data == null ? "" : data), fut); } OkapiClient(RoutingContext ctx);  OkapiClient(String okapiUrl, Vertx vertx, Map<String, String> headers);  OkapiClient(HttpClient httpClient, String okapiUrl,
                     Vertx vertx, Map<String, String> headers); void setHeaders(Map<String, String> headers); void setOkapiUrl(String okapiUrl); void enableInfoLog(); void disableInfoLog(); void newReqId(String path); void request(HttpMethod method, String path, String data,
                      Handler<ExtendedAsyncResult<String>> fut); void request(HttpMethod method, String path, Buffer data,
                      Handler<ExtendedAsyncResult<String>> fut); void post(String path, String data,
                   Handler<ExtendedAsyncResult<String>> fut); void get(String path,
                  Handler<ExtendedAsyncResult<String>> fut); void delete(String path,
                     Handler<ExtendedAsyncResult<String>> fut); void head(String path,
                   Handler<ExtendedAsyncResult<String>> fut); String getOkapiUrl(); MultiMap getRespHeaders(); String getResponsebody(); int getStatusCode(); String getOkapiToken(); void setClosedRetry(int msecs); void setOkapiToken(String token); void close();  }
@Test public void testLegacyPostOk(TestContext context) { StringBuilder b = new StringBuilder(); context.assertTrue(server != null); HttpClient client = vertx.createHttpClient(); client.request(HttpMethod.POST, PORT, LOCALHOST, URL + "/test1") .onComplete(context.asyncAssertSuccess(request -> { request.end(); request.onComplete(context.asyncAssertSuccess(response -> { context.assertEquals(200, response.statusCode()); })); })); }