Enum Class HttpMethod

java.lang.Object
java.lang.Enum<HttpMethod>
org.basex.util.http.HttpMethod
All Implemented Interfaces:
Serializable, Comparable<HttpMethod>, java.lang.constant.Constable

public enum HttpMethod extends Enum<HttpMethod>
This enumeration contains basic HTTP methods.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Enum Constant Details

    • GET

      public static final HttpMethod GET
      GET method.
    • POST

      public static final HttpMethod POST
      POST method.
    • PUT

      public static final HttpMethod PUT
      PUT method.
    • DELETE

      public static final HttpMethod DELETE
      DELETE method.
    • OPTIONS

      public static final HttpMethod OPTIONS
      OPTIONS method.
  • Field Details

    • body

      public final boolean body
      Flag showing if body can be present in the HTTP request with the current method.
  • Method Details

    • values

      public static HttpMethod[] 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 HttpMethod 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
    • get

      public static HttpMethod get(String name)
      Returns an enum for the specified string.
      Parameters:
      name - method name
      Returns:
      enum or null