public final class HttpRequestMethod extends Object implements Comparable<HttpRequestMethod>
| 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 |
|---|---|
int |
compareTo(HttpRequestMethod anotherMethod) |
boolean |
equals(Object o) |
int |
hashCode() |
String |
name()
Get the method name.
|
static HttpRequestMethod |
of(String name)
Returns an
HttpRequestMethod for the specified
method name. |
static HttpRequestMethod |
of(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. |
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(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(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 String name()
public HttpRequestMethod.Properties properties()
HttpRequestMethod.Properties associated with this method.HttpRequestMethod.Properties associated with this methodpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(HttpRequestMethod anotherMethod)
compareTo in interface Comparable<HttpRequestMethod>public String toString()
toString in class Object