Enum Class HttpVersion

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

public enum HttpVersion extends Enum<HttpVersion>
Enum representing different HTTP versions.
Since:
2.0
Author:
graemerocher
  • Enum Constant Details

    • HTTP_1_0

      public static final HttpVersion HTTP_1_0
      HTTP/1.0.
    • HTTP_1_1

      public static final HttpVersion HTTP_1_1
      HTTP/1.1.
    • HTTP_2_0

      public static final HttpVersion HTTP_2_0
      HTTP/2.0.
  • Method Details

    • values

      public static HttpVersion[] 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 HttpVersion 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
    • valueOf

      public static HttpVersion valueOf(double v)
      Return an HttpVersion for the given value.
      Parameters:
      v - The value
      Returns:
      The version
      Throws:
      IllegalArgumentException - If the given value is not a valid http version.