public enum HttpMethod extends Enum<HttpMethod> implements CharSequence
Enum Constant and Description |
---|
CONNECT
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.9.
|
DELETE
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7.
|
GET
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3.
|
HEAD
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4.
|
OPTIONS
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2.
|
PATCH
See https://tools.ietf.org/html/rfc5789.
|
POST
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5.
|
PUT
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6.
|
TRACE
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.8.
|
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
int |
length() |
static boolean |
permitsRequestBody(HttpMethod method)
Whether the given method allows a request body.
|
static boolean |
requiresRequestBody(HttpMethod method)
Whether the given method requires a request body.
|
CharSequence |
subSequence(int start,
int end) |
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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, toString, wait, wait, wait
chars, codePoints, toString
public static final HttpMethod OPTIONS
public static final HttpMethod GET
public static final HttpMethod HEAD
public static final HttpMethod POST
public static final HttpMethod PUT
public static final HttpMethod DELETE
public static final HttpMethod TRACE
public static final HttpMethod CONNECT
public static final HttpMethod PATCH
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 int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public static boolean requiresRequestBody(HttpMethod method)
method
- The HttpMethod
public static boolean permitsRequestBody(HttpMethod method)
method
- The HttpMethod