Package com.linecorp.armeria.common
Enum Class HttpMethod
- All Implemented Interfaces:
Serializable
,Comparable<HttpMethod>
,Constable
HTTP request method.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSpecial HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.The CONNECT method which is used for a proxy that can dynamically switch to being a tunnel or for bootstrapping WebSockets with HTTP/2.Special HTTP method that is not defined in HTTP/1.1.The DELETE method which requests that the origin server delete the resource identified by the Request-URI.The GET method which means retrieve whatever information (in the form of an entity) is identified by the Request-URI.The HEAD method which is identical to GET except that the server MUST NOT return a message-body in the response.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.The OPTIONS method which represents a request for information about the communication options available on the request/response chain identified by the Request-URI.Special HTTP method that is not defined in HTTP/1.1.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.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.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.The PUT method which requests that the enclosed entity be stored under the supplied Request-URI.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.The TRACE method which is used to invoke a remote, application-layer loop-back of the request message.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.A special constant returned byRequestHeaderGetters.method()
to signify that a request has a method not defined in this enum.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1.Special HTTP method that is not defined in HTTP/1.1. -
Method Summary
Modifier and TypeMethodDescriptionstatic Set
<HttpMethod> Returns the idempotent HTTP methods.static boolean
isSupported
(String value) Returns whether the specifiedString
is one of the supported method names.static Set
<HttpMethod> Returns allHttpMethod
s exceptUNKNOWN
.static Set
<HttpMethod> Returns the safe HTTP methods.static @Nullable HttpMethod
Parses the specifiedString
into anHttpMethod
.static HttpMethod
Returns 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
-
ACL
Special HTTP method that is not defined in HTTP/1.1. -
BASELINE_CONTROL
Special HTTP method that is not defined in HTTP/1.1. -
BIND
Special HTTP method that is not defined in HTTP/1.1. -
CHECKIN
Special HTTP method that is not defined in HTTP/1.1. -
CHECKOUT
Special HTTP method that is not defined in HTTP/1.1. -
CONNECT
The CONNECT method which is used for a proxy that can dynamically switch to being a tunnel or for bootstrapping WebSockets with HTTP/2. Note that Armeria handles aCONNECT
request only for bootstrapping WebSockets. -
COPY
Special HTTP method that is not defined in HTTP/1.1. -
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. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process. -
HEAD
The HEAD method which is identical to GET except that the server MUST NOT return a message-body in the response. -
LABEL
Special HTTP method that is not defined in HTTP/1.1. -
LINK
Special HTTP method that is not defined in HTTP/1.1. -
LOCK
Special HTTP method that is not defined in HTTP/1.1. -
MERGE
Special HTTP method that is not defined in HTTP/1.1. -
MKACTIVITY
Special HTTP method that is not defined in HTTP/1.1. -
MKCALENDAR
Special HTTP method that is not defined in HTTP/1.1. -
MKCOL
Special HTTP method that is not defined in HTTP/1.1. -
MKREDIRECTREF
Special HTTP method that is not defined in HTTP/1.1. -
MKWORKSPACE
Special HTTP method that is not defined in HTTP/1.1. -
MOVE
Special HTTP method that is not defined in HTTP/1.1. -
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. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval. -
ORDERPATCH
Special HTTP method that is not defined in HTTP/1.1. -
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. -
PRI
Special HTTP method that is not defined in HTTP/1.1. -
PROPFIND
Special HTTP method that is not defined in HTTP/1.1. -
PROPPATCH
Special HTTP method that is not defined in HTTP/1.1. -
PUT
The PUT method which requests that the enclosed entity be stored under the supplied Request-URI. -
REBIND
Special HTTP method that is not defined in HTTP/1.1. -
REPORT
Special HTTP method that is not defined in HTTP/1.1. -
SEARCH
Special HTTP method that is not defined in HTTP/1.1. -
TRACE
The TRACE method which is used to invoke a remote, application-layer loop-back of the request message. -
UNBIND
Special HTTP method that is not defined in HTTP/1.1. -
UNCHECKOUT
Special HTTP method that is not defined in HTTP/1.1. -
UNLINK
Special HTTP method that is not defined in HTTP/1.1. -
UNLOCK
Special HTTP method that is not defined in HTTP/1.1. -
UPDATE
Special HTTP method that is not defined in HTTP/1.1. -
UPDATEREDIRECTREF
Special HTTP method that is not defined in HTTP/1.1. -
VERSION_CONTROL
Special HTTP method that is not defined in HTTP/1.1. -
UNKNOWN
A special constant returned byRequestHeaderGetters.method()
to signify that a request has a method not defined in this enum.
-
-
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
-
isSupported
Returns whether the specifiedString
is one of the supported method names.- Returns:
true
if supported.false
otherwise.
-
idempotentMethods
Returns the idempotent HTTP methods. -
safeMethods
Returns the safe HTTP methods. -
knownMethods
Returns allHttpMethod
s exceptUNKNOWN
. -
tryParse
Parses the specifiedString
into anHttpMethod
. This method will return the sameHttpMethod
instance for equal values ofmethod
. Note that this method will not treat"UNKNOWN"
as a valid value and thus will returnnull
when"UNKNOWN"
is given.- Returns:
null
if there is no suchHttpMethod
available
-