public interface RedirectConfig
RedirectConfigBuilder| Modifier and Type | Interface and Description |
|---|---|
static interface |
RedirectConfig.RedirectPredicate
Predicate to make the final decision if redirect should be performed or not based on the given context.
|
static interface |
RedirectConfig.RedirectRequestTransformer
Provides access to the full context of the redirect to apply transformations for the pre-initialized redirect
request.
|
| Modifier and Type | Method and Description |
|---|---|
Set<HttpRequestMethod> |
allowedMethods()
HttpRequestMethods that are allowed to follow redirects. |
Set<HttpResponseStatus> |
allowedStatuses()
HttpResponseStatuses that are allowed to follow redirects. |
boolean |
allowNonRelativeRedirects()
Tells if redirection should follow non-relative redirects (if supported by the underlying client implementation).
|
BiFunction<HttpRequestMetaData,HttpResponseMetaData,String> |
locationMapper()
|
int |
maxRedirects()
Maximum number of redirects to follow.
|
RedirectConfig.RedirectPredicate |
redirectPredicate()
RedirectConfig.RedirectPredicate to make the final decision if redirect should be performed or not based on the
given context. |
RedirectConfig.RedirectRequestTransformer |
redirectRequestTransformer()
RedirectConfig.RedirectRequestTransformer to apply further modifications for the redirect request after it was
initialized. |
int maxRedirects()
Set<HttpResponseStatus> allowedStatuses()
HttpResponseStatuses that are allowed to follow redirects.
All statuses in this set must belong to REDIRECTION_3XX status class.
HttpResponseStatuses that are allowed to follow redirects.Set<HttpRequestMethod> allowedMethods()
HttpRequestMethods that are allowed to follow redirects.HttpRequestMethods that are allowed to follow redirects.boolean allowNonRelativeRedirects()
Notes:
MultiAddressHttpClientBuilder. If a client is limited to only one target host/port/scheme, it will
follow only relative redirects.RedirectConfig.RedirectRequestTransformer to preserve headers or message
body.true if redirection should follow non-relative redirects (if supported by the underlying client
implementation).MultiAddressHttpClientBuilder.followRedirects(RedirectConfig)BiFunction<HttpRequestMetaData,HttpResponseMetaData,String> locationMapper()
response,
optionally considering the previous request as well.null, redirection
response won't be followed.RedirectConfig.RedirectPredicate redirectPredicate()
RedirectConfig.RedirectPredicate to make the final decision if redirect should be performed or not based on the
given context.RedirectConfig.RedirectPredicate to make the final decision if redirect should be performed or not based
on the given context.RedirectConfig.RedirectRequestTransformer redirectRequestTransformer()
RedirectConfig.RedirectRequestTransformer to apply further modifications for the redirect request after it was
initialized.RedirectConfig.RedirectRequestTransformer to apply further modifications for the redirect request after it was
initialized.