Package com.oorian.html.elements.consts
Enum Class FormMethod
- All Implemented Interfaces:
Serializable,Comparable<FormMethod>,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Gets the HTTP method name for this form method.toString()static FormMethodReturns the enum constant of this class with the specified name.static FormMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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 nameNullPointerException- if the argument is null
-
getValue
Gets the HTTP method name for this form method.- Returns:
- the uppercase HTTP method name (GET or POST).
-
toString
- Overrides:
toStringin classEnum<FormMethod>
-