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
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpRequestMethodHTTP CONNECT method.static final HttpRequestMethodHTTP DELETE method.static final HttpRequestMethodHTTP GET method.static final HttpRequestMethodHTTP HEAD method.static final HttpRequestMethodHTTP OPTIONS method.static final HttpRequestMethodHTTP PATCH method.static final HttpRequestMethodHTTP POST method.static final HttpRequestMethodHTTP PUT method.static final HttpRequestMethodHTTP TRACE method. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(HttpRequestMethod anotherMethod) booleaninthashCode()name()Get the method name.static HttpRequestMethodReturns anHttpRequestMethodfor the specified method name.static HttpRequestMethodof(String name, HttpRequestMethod.Properties properties) Returns anHttpRequestMethodfor the specifiedStringrepresentation of method name andHttpRequestMethod.Properties.Get theHttpRequestMethod.Propertiesassociated with this method.toString()voidWrite the equivalent of thisHttpRequestMethodto aBuffer.
-
Field Details
-
Method Details
-
of
Returns anHttpRequestMethodfor the specifiedStringrepresentation of method name andHttpRequestMethod.Properties. Generally, the constants inHttpRequestMethodshould be used.- Parameters:
name- a method nameproperties- Common HTTP Method Properties- Returns:
- an
HttpRequestMethod - Throws:
IllegalArgumentException- ifnamedoes not follow the valid token format
-
of
Returns anHttpRequestMethodfor the specified method name.- Parameters:
name- a method name- Returns:
- an
HttpRequestMethodornullif the method name is unknown
-
writeTo
Write the equivalent of thisHttpRequestMethodto aBuffer.- Parameters:
buffer- theBufferto write to
-
name
Get the method name.- Returns:
- The method name
-
properties
Get theHttpRequestMethod.Propertiesassociated with this method.- Returns:
- the
HttpRequestMethod.Propertiesassociated with this method
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<HttpRequestMethod>
-
toString
-