public interface HttpMethod
Modifier and Type | Field and Description |
---|---|
static HttpMethod |
DELETE
The DELETE method.
|
static HttpMethod |
GET
The GET method.
|
static HttpMethod |
HEAD
The HEAD method.
|
static HttpMethod |
OPTIONS
The OPTIONS method.
|
static HttpMethod |
PATCH
The PATCH method.
|
static HttpMethod |
POST
The POST method.
|
static HttpMethod |
PUT
The PUT method.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
The name of the method, always in upper case.
|
HttpMethod |
getNettyMethod()
Returns the method in the underlying Netty form.
|
boolean |
isDelete()
True if the method is DELETE.
|
boolean |
isGet()
True if the method is GET or HEAD.
|
boolean |
isHead()
True if the method is HEAD.
|
boolean |
isOptions()
True if the method is OPTIONS.
|
boolean |
isPatch()
True if the method is PATCH.
|
boolean |
isPost()
True if the method is POST.
|
boolean |
isPut()
True if the method is PUT.
|
boolean |
name(String name)
Returns true if the method has the given name, insensitive to case.
|
static HttpMethod |
of(String name)
Creates a method of the given name.
|
static final HttpMethod GET
static final HttpMethod HEAD
static final HttpMethod POST
static final HttpMethod PUT
static final HttpMethod DELETE
static final HttpMethod PATCH
static final HttpMethod OPTIONS
static HttpMethod of(String name)
name
- the method nameString getName()
boolean isPost()
boolean isGet()
boolean isPut()
boolean isPatch()
boolean isDelete()
boolean isOptions()
boolean isHead()
boolean name(String name)
name
- The name of the method to compare to the actual method name.getName()
irrespective of case.HttpMethod getNettyMethod()
Use of this method should be avoided, in favor of using the other methods of this interface.