Enum Class RedirectPolicy
- All Implemented Interfaces:
Serializable, Comparable<RedirectPolicy>, Constable
Redirect policy for outbound
WebRequest execution through the direct native client or proxy.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUses the JDK's normal redirect policy, which follows HTTP-to-HTTP, HTTP-to-HTTPS, and HTTPS-to-HTTPS redirects, but not HTTPS-to-HTTP redirects.Uses the application default.Does not follow redirects.Follows at most five redirects, and only when scheme, host, and effective port equal the original request origin. -
Method Summary
Modifier and TypeMethodDescriptionstatic RedirectPolicyReturns the enum constant of this class with the specified name.static RedirectPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Uses the application default. Compatibility defaults allow normal JDK redirects; newer defaults only follow redirects within the original origin. -
NEVER
Does not follow redirects. -
SAME_ORIGIN
Follows at most five redirects, and only when scheme, host, and effective port equal the original request origin. The origin is verified before any request headers or body are reused for the redirect target. -
ALLOW
Uses the JDK's normal redirect policy, which follows HTTP-to-HTTP, HTTP-to-HTTPS, and HTTPS-to-HTTPS redirects, but not HTTPS-to-HTTP redirects.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-