public final class HttpRequestMethod
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpRequestMethod.Properties
|
Modifier and Type | Field and Description |
---|---|
static HttpRequestMethod |
CONNECT
HTTP CONNECT method.
|
static HttpRequestMethod |
DELETE
HTTP DELETE method.
|
static HttpRequestMethod |
GET
HTTP GET method.
|
static HttpRequestMethod |
HEAD
HTTP HEAD method.
|
static HttpRequestMethod |
OPTIONS
HTTP OPTIONS method.
|
static HttpRequestMethod |
PATCH
HTTP PATCH method.
|
static HttpRequestMethod |
POST
HTTP POST method.
|
static HttpRequestMethod |
PUT
HTTP PUT method.
|
static HttpRequestMethod |
TRACE
HTTP TRACE method.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
name()
Get the method name.
|
static HttpRequestMethod |
of(java.lang.String name)
Returns an
HttpRequestMethod for the specified
method name. |
static HttpRequestMethod |
of(java.lang.String name,
HttpRequestMethod.Properties properties)
Returns an
HttpRequestMethod for the specified String representation of
method name and HttpRequestMethod.Properties . |
HttpRequestMethod.Properties |
properties()
Get the
HttpRequestMethod.Properties associated with this method. |
java.lang.String |
toString() |
void |
writeTo(Buffer buffer)
Write the equivalent of this
HttpRequestMethod to a Buffer . |
public static final HttpRequestMethod GET
public static final HttpRequestMethod HEAD
public static final HttpRequestMethod POST
public static final HttpRequestMethod PUT
public static final HttpRequestMethod DELETE
public static final HttpRequestMethod CONNECT
public static final HttpRequestMethod OPTIONS
public static final HttpRequestMethod TRACE
public static final HttpRequestMethod PATCH
public static HttpRequestMethod of(java.lang.String name, HttpRequestMethod.Properties properties)
HttpRequestMethod
for the specified String
representation of
method name and HttpRequestMethod.Properties
.
Generally, the constants in HttpRequestMethod
should be used.name
- a method nameproperties
- Common HTTP Method PropertiesHttpRequestMethod
@Nullable public static HttpRequestMethod of(java.lang.String name)
HttpRequestMethod
for the specified
method name.name
- a method nameHttpRequestMethod
or null
if the method name is unknownpublic void writeTo(Buffer buffer)
HttpRequestMethod
to a Buffer
.buffer
- the Buffer
to write topublic java.lang.String name()
public HttpRequestMethod.Properties properties()
HttpRequestMethod.Properties
associated with this method.HttpRequestMethod.Properties
associated with this methodpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object