public static enum H.Method extends Enum<H.Method>
| Enum Constant and Description |
|---|
_UNKNOWN_ |
CONNECT |
DELETE |
GET |
HEAD |
OPTIONS |
PATCH |
POST |
PUT |
TRACE |
| Modifier and Type | Method and Description |
|---|---|
static EnumSet<H.Method> |
actionMethods() |
boolean |
isUnknown()
Is this known method?
|
boolean |
safe()
Returns if this http method is safe, meaning it won’t change the state of the server
|
boolean |
unsafe()
Returns if this http method is unsafe, meaning it will change the state of the server
|
static H.Method |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static H.Method |
valueOfIgnoreCase(String method)
Returns an HTTP Method enum corresponding to the method string.
|
static H.Method[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final H.Method GET
public static final H.Method HEAD
public static final H.Method POST
public static final H.Method DELETE
public static final H.Method PUT
public static final H.Method PATCH
public static final H.Method TRACE
public static final H.Method OPTIONS
public static final H.Method CONNECT
public static final H.Method _UNKNOWN_
public static H.Method[] values()
for (H.Method c : H.Method.values()) System.out.println(c);
public static H.Method valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean safe()
Returns if this http method is safe, meaning it won’t change the state of the server
unsafe()public boolean unsafe()
Returns if this http method is unsafe, meaning it will change the state of the server
safe()public boolean isUnknown()
Is this known method?
true if this method is unknownpublic static H.Method valueOfIgnoreCase(String method)
Returns an HTTP Method enum corresponding to the method string.
If no HTTP method enum found then _UNKNOWN_ will be returned
method - the method stringCopyright © 2017–2020 OSGL (Open Source General Library). All rights reserved.