Enum HttpRequestMethod
- java.lang.Object
-
- java.lang.Enum<HttpRequestMethod>
-
- com.github.m0nk3y2k4.thetvdb.internal.util.http.HttpRequestMethod
-
- All Implemented Interfaces:
Serializable
,Comparable<HttpRequestMethod>
public enum HttpRequestMethod extends Enum<HttpRequestMethod>
Simple enumeration for HTTP request methods to be used when calling the remote API REST service
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
The String representation of this HTTP request methodstatic HttpRequestMethod
valueOf(String name)
Returns the enum constant of this type with the specified name.static HttpRequestMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GET
public static final HttpRequestMethod GET
HTTP request methods supported by this API
-
POST
public static final HttpRequestMethod POST
-
HEAD
public static final HttpRequestMethod HEAD
-
PUT
public static final HttpRequestMethod PUT
-
DELETE
public static final HttpRequestMethod DELETE
-
-
Method Detail
-
values
public static HttpRequestMethod[] 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 (HttpRequestMethod c : HttpRequestMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpRequestMethod 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
-
getName
public String getName()
The String representation of this HTTP request method- Returns:
- HTTP request method as String
-
-