Enum Class FormMethod

java.lang.Object
java.lang.Enum<FormMethod>
com.oorian.html.elements.consts.FormMethod
All Implemented Interfaces:
Serializable, Comparable<FormMethod>, Constable

public enum FormMethod extends Enum<FormMethod>
Enumeration defining the HTTP methods used for form submission. This enum provides type-safe constants for the form element's "method" attribute, which specifies how form data should be transmitted to the server.
Since:
1.0
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • GET

      public static final FormMethod GET
      HTTP GET method - form data appended to URL as query parameters. Suitable for idempotent requests and bookmarkable form submissions. Data is visible in the URL and subject to length restrictions.
    • POST

      public static final FormMethod POST
      HTTP POST method - form data sent in the request body. Suitable for non-idempotent requests and sensitive data. No length restrictions and data is not visible in the URL.
  • Method Details

    • values

      public static FormMethod[] 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 FormMethod 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
    • getValue

      public String getValue()
      Gets the HTTP method name for this form method.
      Returns:
      the uppercase HTTP method name (GET or POST).
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FormMethod>