Enum FollowRedirect

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FollowRedirect>

    public enum FollowRedirect
    extends java.lang.Enum<FollowRedirect>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALWAYS
      Implement both status 3xx + location and HTML redirects.
      HTML_ONLY
      Handle only HTML response with META refresh header.
      LOCATION_ONLY
      Redirect only upon status 3xx accompanied with a 'location' header.
      NEVER
      Do not insert any automatic redirection handling.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FollowRedirect valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FollowRedirect[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NEVER

        public static final FollowRedirect NEVER
        Do not insert any automatic redirection handling.
      • LOCATION_ONLY

        public static final FollowRedirect LOCATION_ONLY
        Redirect only upon status 3xx accompanied with a 'location' header. Status, headers, body and completions handlers are suppressed in this case (only raw-bytes handlers are still running). This is the default option.
      • HTML_ONLY

        public static final FollowRedirect HTML_ONLY
        Handle only HTML response with META refresh header. Status, headers and body handlers are invoked both on the original response and on the response from subsequent requests. Completion handlers are suppressed on this request and invoked after the last response arrives (in case of multiple redirections).
      • ALWAYS

        public static final FollowRedirect ALWAYS
        Implement both status 3xx + location and HTML redirects.
    • Method Detail

      • values

        public static FollowRedirect[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FollowRedirect c : FollowRedirect.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FollowRedirect valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null