public enum HttpMethod extends Enum<HttpMethod>
| Enum Constant and Description |
|---|
CONNECT
The CONNECT method which is used for a proxy that can dynamically switch to being a tunnel.
|
DELETE
The DELETE method which requests that the origin server delete the resource identified by the
Request-URI.
|
GET
The GET method which means retrieve whatever information (in the form of an entity) is identified
by the Request-URI.
|
HEAD
The HEAD method which is identical to GET except that the server MUST NOT return a message-body
in the response.
|
OPTIONS
The OPTIONS method which represents a request for information about the communication options
available on the request/response chain identified by the Request-URI.
|
PATCH
The PATCH method which requests that a set of changes described in the
request entity be applied to the resource identified by the Request-URI.
|
POST
The POST method which is used to request that the origin server accept the entity enclosed in the
request as a new subordinate of the resource identified by the Request-URI in the
Request-Line.
|
PUT
The PUT method which requests that the enclosed entity be stored under the supplied Request-URI.
|
TRACE
The TRACE method which is used to invoke a remote, application-layer loop-back of the request
message.
|
UNKNOWN
A special method which represents the client sent a method that is none of the constants defined in
this enum.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isSupported(String value)
Returns whether the specified
String is one of the supported method names. |
static Set<HttpMethod> |
knownMethods()
Returns all
HttpMethods except UNKNOWN. |
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 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 PATCH
public static final HttpMethod DELETE
public static final HttpMethod TRACE
public static final HttpMethod CONNECT
public static final HttpMethod UNKNOWN
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 static boolean isSupported(String value)
String is one of the supported method names.true if supported. false otherwise.public static Set<HttpMethod> knownMethods()
HttpMethods except UNKNOWN.Copyright © 2020 LeanCloud. All rights reserved.