public enum Method extends Enum<Method>
Each method is:
PUT and DELETE are both
 idempotent but unsafe.| Enum Constant and Description | 
|---|
| CONNECTThe HTTP  CONNECTmethod is unsafe and non-idempotent. | 
| DELETEThe HTTP  DELETEmethod is unsafe and idempotent. | 
| GETThe HTTP  GETmethod is safe and idempotent. | 
| HEADThe HTTP  HEADmethod is safe and idempotent. | 
| OPTIONSThe HTTP  OPTIONSmethod is safe and idempotent. | 
| PATCHThe HTTP  PATCHmethod is unsafe and non-idempotent. | 
| POSTThe HTTP  POSTmethod is unsafe and non-idempotent. | 
| PUTThe HTTP  PUTmethod is unsafe and idempotent. | 
| TRACEThe HTTP  TRACEmethod is safe and idempotent. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | isIdempotent()Tests whether this method is idempotent. | 
| static boolean | isIdempotent(String value) | 
| boolean | isSafe()Tests whether this method is safe. | 
| static boolean | isSafe(String value) | 
| boolean | isSame(String value) | 
| static Method | normalizedValueOf(String method)Returns the Method for a normalized  valueof a method name. | 
| static Method | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static Method[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final Method GET
GET method is safe and idempotent.public static final Method HEAD
HEAD method is safe and idempotent.public static final Method POST
POST method is unsafe and non-idempotent.public static final Method PUT
PUT method is unsafe and idempotent.public static final Method DELETE
DELETE method is unsafe and idempotent.public static final Method CONNECT
CONNECT method is unsafe and non-idempotent.public static final Method TRACE
TRACE method is safe and idempotent.public static final Method OPTIONS
OPTIONS method is safe and idempotent.public static final Method PATCH
PATCH method is unsafe and non-idempotent.public static Method[] values()
for (Method c : Method.values()) System.out.println(c);
public static 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 isSafe()
public boolean isIdempotent()
public static boolean isSafe(String value)
public static boolean isIdempotent(String value)
public static Method normalizedValueOf(String method)
value of a method name.method - A method name like "delete", "DELETE", or any mixed-case variant.public boolean isSame(String value)
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.