Using OkHttpClient, I can enqueue requests, which schedules the request to be executed at some point in the future.
okhttpClient
.newCall(request)
.enqueue(
new Callback() {
@Override
public void onResponse(Call arg0, Response arg1) throws IOException {
log.info("Call success", arg1);
}
@Override
public void onFailure(Call arg0, IOException arg1) {
log.info("Call fail", arg1);
}
});
Is it possible to support this implementation with Open Feign (if a way does not exist already).
Comment From: siddy-buku
There is a way to achieve this via CompletableFuture. I went ahead with this wrapper approach.