Enum Class Request.Method

java.lang.Object
java.lang.Enum<Request.Method>
org.attribyte.api.http.Request.Method
All Implemented Interfaces:
Serializable, Comparable<Request.Method>, Constable
Enclosing class:
Request

public static enum Request.Method extends Enum<Request.Method>
The HTTP methods.
  • Enum Constant Details

    • GET

      public static final Request.Method GET
      The HTTP GET method.
    • POST

      public static final Request.Method POST
      The HTTP POST method.
    • PUT

      public static final Request.Method PUT
      The HTTP PUT method.
    • PATCH

      public static final Request.Method PATCH
      The HTTP PATCH method.
    • OPTIONS

      public static final Request.Method OPTIONS
      The HTTP OPTIONS method.
    • DELETE

      public static final Request.Method DELETE
      The HTTP DELETE method.
  • Method Details

    • values

      public static Request.Method[] 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 Request.Method 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
    • fromString

      public static Request.Method fromString(String str)
      Gets a method from a string.
      Parameters:
      str - The string.
      Returns:
      The method or null if string does not match a valid method.