Package io.servicetalk.http.api
Class HttpRequestMethod
- java.lang.Object
-
- io.servicetalk.http.api.HttpRequestMethod
-
public final class HttpRequestMethod extends java.lang.ObjectHTTP Request Methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRequestMethod.Properties
-
Field Summary
Fields Modifier and Type Field Description static HttpRequestMethodCONNECTHTTP CONNECT method.static HttpRequestMethodDELETEHTTP DELETE method.static HttpRequestMethodGETHTTP GET method.static HttpRequestMethodHEADHTTP HEAD method.static HttpRequestMethodOPTIONSHTTP OPTIONS method.static HttpRequestMethodPATCHHTTP PATCH method.static HttpRequestMethodPOSTHTTP POST method.static HttpRequestMethodPUTHTTP PUT method.static HttpRequestMethodTRACEHTTP TRACE method.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.Stringname()Get the method name.static HttpRequestMethodof(java.lang.String name)Returns anHttpRequestMethodfor the specified method name.static HttpRequestMethodof(java.lang.String name, HttpRequestMethod.Properties properties)Returns anHttpRequestMethodfor the specifiedStringrepresentation of method name andHttpRequestMethod.Properties.HttpRequestMethod.Propertiesproperties()Get theHttpRequestMethod.Propertiesassociated with this method.java.lang.StringtoString()voidwriteTo(Buffer buffer)Write the equivalent of thisHttpRequestMethodto 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 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
-
of
@Nullable public static HttpRequestMethod of(java.lang.String name)
Returns anHttpRequestMethodfor the specified method name.- Parameters:
name- a method name- Returns:
- an
HttpRequestMethodornullif the method name is unknown
-
writeTo
public void writeTo(Buffer buffer)
Write the equivalent of thisHttpRequestMethodto aBuffer.- Parameters:
buffer- theBufferto write to
-
name
public java.lang.String name()
Get the method name.- Returns:
- The method name
-
properties
public HttpRequestMethod.Properties properties()
Get theHttpRequestMethod.Propertiesassociated with this method.- Returns:
- the
HttpRequestMethod.Propertiesassociated with this method
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-