Package io.servicetalk.http.api
Class HttpRequestMethod
java.lang.Object
io.servicetalk.http.api.HttpRequestMethod
- All Implemented Interfaces:
Comparable<HttpRequestMethod>
HTTP Request Methods.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HttpRequestMethod
HTTP CONNECT method.static final HttpRequestMethod
HTTP DELETE method.static final HttpRequestMethod
HTTP GET method.static final HttpRequestMethod
HTTP HEAD method.static final HttpRequestMethod
HTTP OPTIONS method.static final HttpRequestMethod
HTTP PATCH method.static final HttpRequestMethod
HTTP POST method.static final HttpRequestMethod
HTTP PUT method.static final HttpRequestMethod
HTTP TRACE method. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(HttpRequestMethod anotherMethod) boolean
int
hashCode()
name()
Get the method name.static HttpRequestMethod
Returns anHttpRequestMethod
for the specified method name.static HttpRequestMethod
of
(String name, HttpRequestMethod.Properties properties) Returns anHttpRequestMethod
for the specifiedString
representation of method name andHttpRequestMethod.Properties
.Get theHttpRequestMethod.Properties
associated with this method.toString()
void
Write the equivalent of thisHttpRequestMethod
to aBuffer
.
-
Field Details
-
Method Details
-
of
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
- Throws:
IllegalArgumentException
- ifname
does not follow the valid token format
-
of
Returns anHttpRequestMethod
for the specified method name.- Parameters:
name
- a method name- Returns:
- an
HttpRequestMethod
ornull
if the method name is unknown
-
writeTo
Write the equivalent of thisHttpRequestMethod
to aBuffer
.- Parameters:
buffer
- theBuffer
to write to
-
name
Get the method name.- Returns:
- The method name
-
properties
Get theHttpRequestMethod.Properties
associated with this method.- Returns:
- the
HttpRequestMethod.Properties
associated with this method
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<HttpRequestMethod>
-
toString
-