@FunctionalInterface
public static interface RedirectConfig.RedirectPredicate
Implementations should prefer running this predicate as the last check, after validation of the
HttpResponseStatus, RedirectConfig.maxRedirects(), RedirectConfig.allowedMethods(),
presence of the Location header, and
RedirectConfig.allowNonRelativeRedirects().
| Modifier and Type | Method and Description |
|---|---|
boolean |
test(boolean relative,
int redirectCount,
HttpRequestMetaData previousRequest,
HttpResponseMetaData redirectResponse)
Decides if a redirect should be performed or not based on the given context.
|
boolean test(boolean relative,
int redirectCount,
HttpRequestMetaData previousRequest,
HttpResponseMetaData redirectResponse)
relative - if true, the redirect location was identified as relative to the previous requestredirectCount - sequential counter of already processed redirects (starts from 0)previousRequest - previous request that was redirectedredirectResponse - response to redirecttrue if the redirect should be processed based on the given context