public interface Interceptor
| Modifier and Type | Method and Description |
|---|---|
default CompletableFuture<Boolean> |
afterFailure(BasicBuilder builder,
HttpResponse<?> response)
Called after a websocket failure or by default from a normal request
|
default CompletableFuture<Boolean> |
afterFailure(HttpRequest.Builder builder,
HttpResponse<?> response)
Called after a non-websocket failure
|
default void |
before(BasicBuilder builder,
HttpHeaders headers)
Called before a request to allow for the manipulation of the request
|
static UnaryOperator<Interceptor> |
useConfig(Config config) |
default Interceptor |
withConfig(Config config)
Interceptors that rely upon the Config, in particular the RequestConfig, must implement
this method to receive the modified configuration |
default Interceptor withConfig(Config config)
Interceptors that rely upon the Config, in particular the RequestConfig, must implement
this method to receive the modified configurationconfig - static UnaryOperator<Interceptor> useConfig(Config config)
default void before(BasicBuilder builder, HttpHeaders headers)
builder - used to modify the requestheaders - the current headersdefault CompletableFuture<Boolean> afterFailure(BasicBuilder builder, HttpResponse<?> response)
builder - used to modify the requestresponse - the failed responsedefault CompletableFuture<Boolean> afterFailure(HttpRequest.Builder builder, HttpResponse<?> response)
builder - used to modify the requestresponse - the failed responseCopyright © 2015–2022 Red Hat. All rights reserved.