Package io.servicetalk.http.api
Class HttpRequestMethod
- java.lang.Object
-
- io.servicetalk.http.api.HttpRequestMethod
-
public final class HttpRequestMethod extends java.lang.Object
HTTP Request Methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpRequestMethod.Properties
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 anHttpRequestMethod
for the specified method name.static HttpRequestMethod
of(java.lang.String name, HttpRequestMethod.Properties properties)
Returns anHttpRequestMethod
for the specifiedString
representation of method name andHttpRequestMethod.Properties
.HttpRequestMethod.Properties
properties()
Get theHttpRequestMethod.Properties
associated with this method.java.lang.String
toString()
void
writeTo(Buffer buffer)
Write the equivalent of thisHttpRequestMethod
to aBuffer
.
-
-
-
Field Detail
-
GET
public static final HttpRequestMethod GET
HTTP GET method.
-
HEAD
public static final HttpRequestMethod HEAD
HTTP HEAD method.
-
POST
public static final HttpRequestMethod POST
HTTP POST method.
-
PUT
public static final HttpRequestMethod PUT
HTTP PUT method.
-
DELETE
public static final HttpRequestMethod DELETE
HTTP DELETE method.
-
CONNECT
public static final HttpRequestMethod CONNECT
HTTP CONNECT method.
-
OPTIONS
public static final HttpRequestMethod OPTIONS
HTTP OPTIONS method.
-
TRACE
public static final HttpRequestMethod TRACE
HTTP TRACE method.
-
PATCH
public static final HttpRequestMethod PATCH
HTTP PATCH method.
-
-
Method Detail
-
of
public static HttpRequestMethod of(java.lang.String name, HttpRequestMethod.Properties properties)
Returns anHttpRequestMethod
for the specifiedString
representation of method name andHttpRequestMethod.Properties
. Generally, the constants inHttpRequestMethod
should be used.- Parameters:
name
- a method nameproperties
- Common HTTP Method Properties- Returns:
- an
HttpRequestMethod
-
of
@Nullable public static HttpRequestMethod of(java.lang.String name)
Returns anHttpRequestMethod
for the specified method name.- Parameters:
name
- a method name- Returns:
- an
HttpRequestMethod
ornull
if the method name is unknown
-
writeTo
public void writeTo(Buffer buffer)
Write the equivalent of thisHttpRequestMethod
to aBuffer
.- Parameters:
buffer
- theBuffer
to write to
-
name
public java.lang.String name()
Get the method name.- Returns:
- The method name
-
properties
public HttpRequestMethod.Properties properties()
Get theHttpRequestMethod.Properties
associated with this method.- Returns:
- the
HttpRequestMethod.Properties
associated with this method
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-