Enum Class Destination

java.lang.Object
java.lang.Enum<Destination>
io.micronaut.http.Destination
All Implemented Interfaces:
Serializable, Comparable<Destination>, Constable

public enum Destination extends Enum<Destination>
The request destination values of the Sec-Fetch-Dest header.

The Fetch specification and the specifications that extend it keep adding destinations, so this list is a snapshot rather than a closed set: a newer client can legitimately send a destination absent from it. of(String) answers null for such a value, and SecFetch keeps the rest of the metadata readable rather than discarding it.

The list covers the destinations of the Fetch Standard, those that other specifications add to it, and the ones shipping browsers send on the wire. Each constant that comes from outside the Fetch Standard documents its source.

Since:
5.1.12
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static Destination[] 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

      public static Destination valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static @Nullable Destination of(String value)
      Finds the destination for the given Fetch Metadata value.
      Parameters:
      value - The destination value
      Returns:
      The matching destination, or null if there is no match. A null here means the value is not one this version lists, which includes destinations added to the specification since
      Since:
      5.1.12
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Destination>
      Returns:
      The destination value used by Fetch Metadata