Class RedirectConfigBuilder
RedirectConfig
.-
Method Summary
Modifier and TypeMethodDescriptionAllows automatic redirection to all domains.allowDomains(Iterable<String> domains)
Sets the domains that are allowed for automatic redirection.allowDomains(String... domains)
Sets the domains that are allowed for automatic redirection.allowDomains(BiPredicate<? super ClientRequestContext,? super String> predicate)
Sets theBiPredicate
that returnstrue
if the host component of a redirection URI is allowed for automatic redirection.allowProtocols(SessionProtocol... protocols)
Sets theSessionProtocol
s that are allowed for automatic redirection.allowProtocols(Iterable<SessionProtocol> protocols)
Sets theSessionProtocol
s that are allowed for automatic redirection.build()
Returns a newly-createdRedirectConfig
based on the properties set so far.maxRedirects(int maxRedirects)
Sets the maximum number of automatic redirection that the client executes.
-
Method Details
-
maxRedirects
Sets the maximum number of automatic redirection that the client executes. -
allowProtocols
Sets theSessionProtocol
s that are allowed for automatic redirection. OnlySessionProtocol.HTTP
andSessionProtocol.HTTPS
can be set.When the allowed
SessionProtocol
s are not set,SessionProtocol.HTTPS
is set by default. If theWebClient
is created with a base URI that hasSessionProtocol.HTTP
,SessionProtocol.HTTP
is also set. -
allowProtocols
Sets theSessionProtocol
s that are allowed for automatic redirection. OnlySessionProtocol.HTTP
andSessionProtocol.HTTPS
can be set.When the allowed
SessionProtocol
s are not set,SessionProtocol.HTTPS
is set by default. If theWebClient
is created with a base URI that hasSessionProtocol.HTTP
,SessionProtocol.HTTP
is also set. -
allowAllDomains
-
allowDomains
Sets the domains that are allowed for automatic redirection. If the host component of a redirection URI equals to the specified domains, automatic redirection is executed.If the
WebClient
is created without a base URI, theWebClient
executes automatic redirection to all domains by default. If theWebClient
is created with a base URI, automatic redirection is executed to the domain of the base URI by default. -
allowDomains
Sets the domains that are allowed for automatic redirection. If the host component of a redirection URI equals to the specified domains, automatic redirection is executed.If the
WebClient
is created without a base URI, theWebClient
executes automatic redirection to all domains by default. If theWebClient
is created with a base URI, automatic redirection is executed to the domain of the base URI by default. -
allowDomains
public RedirectConfigBuilder allowDomains(BiPredicate<? super ClientRequestContext,? super String> predicate)Sets theBiPredicate
that returnstrue
if the host component of a redirection URI is allowed for automatic redirection.If the
WebClient
is created without a base URI, theWebClient
executes automatic redirection to all domains by default. If theWebClient
is created with a base URI, automatic redirection is executed to the domain of the base URI by default. -
build
Returns a newly-createdRedirectConfig
based on the properties set so far.
-