Top Description Fields Methods
javax.ws.rs

public @Interface HttpMethod

extends Annotation
Annotations
@Target:ANNOTATION_TYPE
@Retention:RUNTIME
@Documented
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

Associates the name of a HTTP method with an annotation. A Java method annotated with a runtime annotation that is itself annotated with this annotation will be used to handle HTTP requests of the indicated HTTP method. It is an error for a method to be annotated with more than one annotation that is annotated with HttpMethod.
Authors
Paul Sandoz, Marc Hadley
Since
1.0
See Also
GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS

Field Summary

Modifier and TypeField and Description
public static final String
DELETE

HTTP DELETE method.

public static final String
GET

HTTP GET method.

public static final String
HEAD

HTTP HEAD method.

public static final String
OPTIONS

HTTP OPTIONS method.

public static final String
PATCH

HTTP PATCH method.

public static final String
POST

HTTP POST method.

public static final String
PUT

HTTP PUT method.

Method Summary

Modifier and TypeMethod and Description
public String
value()

Specifies the name of a HTTP method.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Field Detail

DELETEback to summary
public static final String DELETE

HTTP DELETE method.

GETback to summary
public static final String GET

HTTP GET method.

OPTIONSback to summary
public static final String OPTIONS

HTTP OPTIONS method.

PATCHback to summary
public static final String PATCH

HTTP PATCH method.

Since
2.1
POSTback to summary
public static final String POST

HTTP POST method.

PUTback to summary
public static final String PUT

HTTP PUT method.

Method Detail

valueback to summary
public String value()

Specifies the name of a HTTP method. E.g. "GET".