Package com.helger.commons.http
Enum EHttpMethod
- java.lang.Object
-
- java.lang.Enum<EHttpMethod>
-
- com.helger.commons.http.EHttpMethod
-
- All Implemented Interfaces:
IHasName,Serializable,Comparable<EHttpMethod>
public enum EHttpMethod extends Enum<EHttpMethod> implements IHasName
HTTP 1.1 methods.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EHttpMethodgetFromNameOrDefault(String sName, EHttpMethod eDefault)static EHttpMethodgetFromNameOrNull(String sName)StringgetName()booleanisContentAllowed()booleanisIdempodent()booleanisPayloadInBody()static EHttpMethodvalueOf(String name)Returns the enum constant of this type with the specified name.static EHttpMethod[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPTIONS
public static final EHttpMethod OPTIONS
-
GET
public static final EHttpMethod GET
-
HEAD
public static final EHttpMethod HEAD
-
POST
public static final EHttpMethod POST
-
PUT
public static final EHttpMethod PUT
-
DELETE
public static final EHttpMethod DELETE
-
TRACE
public static final EHttpMethod TRACE
-
CONNECT
public static final EHttpMethod CONNECT
-
PATCH
public static final EHttpMethod PATCH
-
-
Method Detail
-
values
public static EHttpMethod[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EHttpMethod c : EHttpMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EHttpMethod valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isIdempodent
public boolean isIdempodent()
-
isContentAllowed
public boolean isContentAllowed()
-
isPayloadInBody
public boolean isPayloadInBody()
-
getFromNameOrNull
@Nullable public static EHttpMethod getFromNameOrNull(@Nullable String sName)
-
getFromNameOrDefault
@Nullable public static EHttpMethod getFromNameOrDefault(@Nullable String sName, @Nullable EHttpMethod eDefault)
-
-