public enum HttpMethod extends Enum<HttpMethod>
| Enum Constant and Description |
|---|
DELETE
The
DELETE HTTP method. |
GET
The
GET HTTP method. |
HEAD
The
HEAD HTTP method. |
PATCH
The
PATCH HTTP method. |
POST
The
POST HTTP method. |
PUT
The
PUT HTTP method. |
| Modifier and Type | Method and Description |
|---|---|
String |
getVerb()
Get formatted http verb:
Always in upper case.
Related to given HTTP method.
|
boolean |
isBodyAllowed()
Check if request method allow body request (as form url encoded parameter or
as json / xml body).
|
static HttpMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpMethod GET
GET HTTP method.public static final HttpMethod POST
POST HTTP method.public static final HttpMethod PUT
PUT HTTP method.public static final HttpMethod PATCH
PATCH HTTP method.public static final HttpMethod DELETE
DELETE HTTP method.public static final HttpMethod HEAD
HEAD HTTP method.public static HttpMethod[] values()
for (HttpMethod c : HttpMethod.values()) System.out.println(c);
public static HttpMethod valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getVerb()
public boolean isBodyAllowed()
true if method allow body request, false otherwise.Copyright © 2019. All rights reserved.