public interface Interceptor
| Modifier and Type | Method and Description |
|---|---|
default HttpResponse<?> |
onFail(Exception e,
HttpRequestSummary request,
Config config)
Called in the case of a total failure.
|
default void |
onRequest(HttpRequest<?> request,
Config config)
Called just before a request.
|
default void |
onResponse(HttpResponse<?> response,
HttpRequestSummary request,
Config config)
Called just after the request.
|
default void onRequest(HttpRequest<?> request, Config config)
request - the requestconfig - the current configurationdefault void onResponse(HttpResponse<?> response, HttpRequestSummary request, Config config)
response - the responserequest - a summary of the requestconfig - the current configurationdefault HttpResponse<?> onFail(Exception e, HttpRequestSummary request, Config config) throws UnirestException
e - the exceptionrequest - the original requestconfig - the current configUnirestExceptionCopyright © 2023. All rights reserved.