I am trying to use, vertx 3.9.1 http client for downloading files. I want to set the maximum allowed time for a particular download and fail if it exceeds. Is there a way to achieve this via read-Timeout or any other means in vertx.?
vertx.fileSystem().open("/my-file.wav", new OpenOptions(), new Handler<AsyncResult<AsyncFile>>() {
@Override
public void handle(AsyncResult<AsyncFile> event) {
webClient
.get(8080, "
myserver.mycompany.com", "/some-uri/remote-file.wav")
.as(BodyCodec.pipe(event.result()))
.send(new Handler<>() {
@Override
public void handle(AsyncResult<HttpResponse<Void>> event) {
//rest of the stuff
}
});
}
});