- All Implemented Interfaces:
Serializable,Comparable<HttpMethod>,Constable
Http methods
- Author:
- Leonard Woo
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe CONNECT method establishes a tunnel to the server identified by the target resource.The DELETE method deletes the specified resource.The GET method requests a representation of the specified resource.The HEAD method asks for a response identical to a GET request, but without the response body.The OPTIONS method describes the communication options for the target resource.The PATCH method applies partial modifications to a resource.The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server.The PUT method replaces all current representations of the target resource with the request payload.The TRACE method performs a message loop-back test along the path to the target resource. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpMethodReturn anHttpMethodobject for the given value.static HttpMethodReturns the enum constant of this class with the specified name.static HttpMethod[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GET
The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. -
POST
The POST method submits an entity to the specified resource, often causing a change in state or side effects on the server. -
PUT
The PUT method replaces all current representations of the target resource with the request payload. -
DELETE
The DELETE method deletes the specified resource. -
HEAD
The HEAD method asks for a response identical to a GET request, but without the response body. -
OPTIONS
The OPTIONS method describes the communication options for the target resource. -
CONNECT
The CONNECT method establishes a tunnel to the server identified by the target resource. -
TRACE
The TRACE method performs a message loop-back test along the path to the target resource. -
PATCH
The PATCH method applies partial modifications to a resource.
-
-
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
-
resolve
Return anHttpMethodobject for the given value.- Parameters:
name- the method value as a String.- Returns:
- the corresponding
HttpMethod, ornullif not found - Throws:
NullPointerException- method name is null.
-