Package io.vertx.core.http
Class HttpMethod
- java.lang.Object
-
- io.vertx.core.http.HttpMethod
-
public class HttpMethod extends Object
Represents an HTTP method.- Author:
- Tim Fox, Paulo Lopes
-
-
Field Summary
Fields Modifier and Type Field Description static HttpMethod
ACL
The RFC 3744ACL
method, this instance is interned and uniquely used.static HttpMethod
BASELINE_CONTROL
The RFC 3253BASELINE_CONTROL
method, this instance is interned and uniquely used.static HttpMethod
CHECKIN
The RFC 3253CHECKIN
method, this instance is interned and uniquely used.static HttpMethod
CHECKOUT
The RFC 3253CHECKOUT
method, this instance is interned and uniquely used.static HttpMethod
CONNECT
The RFC 2616CONNECT
method, this instance is interned and uniquely used.static HttpMethod
COPY
The RFC 2518/4918COPY
method, this instance is interned and uniquely used.static HttpMethod
DELETE
The RFC 2616DELETE
method, this instance is interned and uniquely used.static HttpMethod
GET
The RFC 2616GET
method, this instance is interned and uniquely used.static HttpMethod
HEAD
The RFC 2616HEAD
method, this instance is interned and uniquely used.static HttpMethod
LABEL
The RFC 3253LABEL
method, this instance is interned and uniquely used.static HttpMethod
LOCK
The RFC 2518/4918LOCK
method, this instance is interned and uniquely used.static HttpMethod
MERGE
The RFC 3253MERGE
method, this instance is interned and uniquely used.static HttpMethod
MKACTIVITY
The RFC 3253MKACTIVITY
method, this instance is interned and uniquely used.static HttpMethod
MKCALENDAR
The RFC 4791MKCALENDAR
method, this instance is interned and uniquely used.static HttpMethod
MKCOL
The RFC 2518/4918MKCOL
method, this instance is interned and uniquely used.static HttpMethod
MKWORKSPACE
The RFC 3253MKWORKSPACE
method, this instance is interned and uniquely used.static HttpMethod
MOVE
The RFC 2518/4918MOVE
method, this instance is interned and uniquely used.static HttpMethod
OPTIONS
The RFC 2616OPTIONS
method, this instance is interned and uniquely used.static HttpMethod
ORDERPATCH
The RFC 3648ORDERPATCH
method, this instance is interned and uniquely used.static HttpMethod
PATCH
The RFC 5789PATCH
method, this instance is interned and uniquely used.static HttpMethod
POST
The {RFC 2616 @code POST} method, this instance is interned and uniquely used.static HttpMethod
PROPFIND
The RFC 2518/4918PROPFIND
method, this instance is interned and uniquely used.static HttpMethod
PROPPATCH
The RFC 2518/4918PROPPATCH
method, this instance is interned and uniquely used.static HttpMethod
PUT
The RFC 2616PUT
method, this instance is interned and uniquely used.static HttpMethod
REPORT
The RFC 3253REPORT
method, this instance is interned and uniquely used.static HttpMethod
SEARCH
The RFC 5323SEARCH
method, this instance is interned and uniquely used.static HttpMethod
TRACE
The RFC 2616TRACE
method, this instance is interned and uniquely used.static HttpMethod
UNCHECKOUT
The RFC 3253UNCHECKOUT
method, this instance is interned and uniquely used.static HttpMethod
UNLOCK
The RFC 2518/4918UNLOCK
method, this instance is interned and uniquely used.static HttpMethod
UPDATE
The RFC 3253UPDATE
method, this instance is interned and uniquely used.static HttpMethod
VERSION_CONTROL
The RFC 3253VERSION_CONTROL
method, this instance is interned and uniquely used.
-
Constructor Summary
Constructors Constructor Description HttpMethod(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static HttpMethod
fromNetty(HttpMethod method)
Lookup theHttpMethod
value for the specifiednettyMethod
.int
hashCode()
String
name()
JsonObject
toJson()
HttpMethod
toNetty()
String
toString()
static HttpMethod
valueOf(String value)
Lookup theHttpMethod
value for the specifiedvalue
.static List<HttpMethod>
values()
-
-
-
Field Detail
-
OPTIONS
public static final HttpMethod OPTIONS
The RFC 2616OPTIONS
method, this instance is interned and uniquely used.
-
GET
public static final HttpMethod GET
The RFC 2616GET
method, this instance is interned and uniquely used.
-
HEAD
public static final HttpMethod HEAD
The RFC 2616HEAD
method, this instance is interned and uniquely used.
-
POST
public static final HttpMethod POST
The {RFC 2616 @code POST} method, this instance is interned and uniquely used.
-
PUT
public static final HttpMethod PUT
The RFC 2616PUT
method, this instance is interned and uniquely used.
-
DELETE
public static final HttpMethod DELETE
The RFC 2616DELETE
method, this instance is interned and uniquely used.
-
TRACE
public static final HttpMethod TRACE
The RFC 2616TRACE
method, this instance is interned and uniquely used.
-
CONNECT
public static final HttpMethod CONNECT
The RFC 2616CONNECT
method, this instance is interned and uniquely used.
-
PATCH
public static final HttpMethod PATCH
The RFC 5789PATCH
method, this instance is interned and uniquely used.
-
PROPFIND
public static final HttpMethod PROPFIND
The RFC 2518/4918PROPFIND
method, this instance is interned and uniquely used.
-
PROPPATCH
public static final HttpMethod PROPPATCH
The RFC 2518/4918PROPPATCH
method, this instance is interned and uniquely used.
-
MKCOL
public static final HttpMethod MKCOL
The RFC 2518/4918MKCOL
method, this instance is interned and uniquely used.
-
COPY
public static final HttpMethod COPY
The RFC 2518/4918COPY
method, this instance is interned and uniquely used.
-
MOVE
public static final HttpMethod MOVE
The RFC 2518/4918MOVE
method, this instance is interned and uniquely used.
-
LOCK
public static final HttpMethod LOCK
The RFC 2518/4918LOCK
method, this instance is interned and uniquely used.
-
UNLOCK
public static final HttpMethod UNLOCK
The RFC 2518/4918UNLOCK
method, this instance is interned and uniquely used.
-
MKCALENDAR
public static final HttpMethod MKCALENDAR
The RFC 4791MKCALENDAR
method, this instance is interned and uniquely used.
-
VERSION_CONTROL
public static final HttpMethod VERSION_CONTROL
The RFC 3253VERSION_CONTROL
method, this instance is interned and uniquely used.
-
REPORT
public static final HttpMethod REPORT
The RFC 3253REPORT
method, this instance is interned and uniquely used.
-
CHECKOUT
public static final HttpMethod CHECKOUT
The RFC 3253CHECKOUT
method, this instance is interned and uniquely used.
-
CHECKIN
public static final HttpMethod CHECKIN
The RFC 3253CHECKIN
method, this instance is interned and uniquely used.
-
UNCHECKOUT
public static final HttpMethod UNCHECKOUT
The RFC 3253UNCHECKOUT
method, this instance is interned and uniquely used.
-
MKWORKSPACE
public static final HttpMethod MKWORKSPACE
The RFC 3253MKWORKSPACE
method, this instance is interned and uniquely used.
-
UPDATE
public static final HttpMethod UPDATE
The RFC 3253UPDATE
method, this instance is interned and uniquely used.
-
LABEL
public static final HttpMethod LABEL
The RFC 3253LABEL
method, this instance is interned and uniquely used.
-
MERGE
public static final HttpMethod MERGE
The RFC 3253MERGE
method, this instance is interned and uniquely used.
-
BASELINE_CONTROL
public static final HttpMethod BASELINE_CONTROL
The RFC 3253BASELINE_CONTROL
method, this instance is interned and uniquely used.
-
MKACTIVITY
public static final HttpMethod MKACTIVITY
The RFC 3253MKACTIVITY
method, this instance is interned and uniquely used.
-
ORDERPATCH
public static final HttpMethod ORDERPATCH
The RFC 3648ORDERPATCH
method, this instance is interned and uniquely used.
-
ACL
public static final HttpMethod ACL
The RFC 3744ACL
method, this instance is interned and uniquely used.
-
SEARCH
public static final HttpMethod SEARCH
The RFC 5323SEARCH
method, this instance is interned and uniquely used.
-
-
Constructor Detail
-
HttpMethod
public HttpMethod(String name)
-
-
Method Detail
-
values
public static List<HttpMethod> values()
- Returns:
- an un-modifiable list of known HTTP methods
-
fromNetty
public static HttpMethod fromNetty(HttpMethod method)
Lookup theHttpMethod
value for the specifiednettyMethod
.
The predefined method constantsGET
,POST
,PUT
,HEAD
,OPTIONS
,DELETE
,TRACE
,CONNECT
andPATCH
are interned and will be returned when case sensitively matching their string value (i.e"GET"
, etc...)
Otherwise a new instance is returned.- Parameters:
method
- the netty method- Returns:
- the
HttpMethod
instance for the specified nettymethod
-
valueOf
public static HttpMethod valueOf(String value)
Lookup theHttpMethod
value for the specifiedvalue
.
The predefined method constantsGET
,POST
,PUT
,HEAD
,OPTIONS
,DELETE
,TRACE
,CONNECT
andPATCH
are interned and will be returned when case sensitively matching their string value (i.e"GET"
, etc...)
Otherwise a new instance is returned.- Parameters:
value
- the value- Returns:
- the
HttpMethod
instance for the specified stringvalue
- Throws:
IllegalArgumentException
- when the value is incorrect, the value is empty or contains an invalid char
-
toJson
public JsonObject toJson()
-
name
public String name()
- Returns:
- the method name
-
toString
public String toString()
-
toNetty
public HttpMethod toNetty()
- Returns:
- the wrapped Netty method instance
-
-