public enum Method extends Enum<Method>
Each method is:
PUT
and DELETE
are both
idempotent but unsafe.Enum Constant and Description |
---|
CONNECT
The HTTP
CONNECT method is unsafe and non-idempotent. |
DELETE
The HTTP
DELETE method is unsafe and idempotent. |
GET
The HTTP
GET method is safe and idempotent. |
HEAD
The HTTP
HEAD method is safe and idempotent. |
OPTIONS
The HTTP
OPTIONS method is safe and idempotent. |
PATCH
The HTTP
PATCH method is unsafe and non-idempotent. |
POST
The HTTP
POST method is unsafe and non-idempotent. |
PUT
The HTTP
PUT method is unsafe and idempotent. |
TRACE
The HTTP
TRACE method 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
value of 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.