Код: Выделить всё
var httpClient = reactor.netty.http.client.HttpClient.create()
// ...
httpClient = httpClient.doAfterResolve((conn, addr) -> {
InetAddress address = ((InetSocketAddress) addr).getAddress();
if (isBlocked(address))
throw new IllegalStateException("IP is blocked");
});
Код: Выделить всё
httpRequest
.retrieve()
// ...
.doOnError(e -> {
// Expect error handling here
})
.toFuture();
Подробнее здесь: https://stackoverflow.com/questions/793 ... httpclient