Annotation Interface HttpMethodRequired


@Deprecated @Retention(RUNTIME) @Target(METHOD) public @interface HttpMethodRequired
Deprecated.
since 7.2.0. Use PermittedMethods instead.
An @HttpMethodRequired annotated action method will only be executed if the HTTP request uses the correct method.

In the general case a method requires a specific HTTP method to be used:

 
 @HttpMethodRequired(HttpMethod.POST)
 @Override public String execute() throws Exception {
     return super.doDefault();
 }
 
 

It's possible to allow more than one method:

 
 @HttpMethodRequired({HttpMethod.POST,HttpMethod.PUT})
 @Override public String execute() throws Exception {
     return super.doDefault();
 }
 
 
Since:
4.2
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    com.atlassian.xwork.HttpMethod[]
    Deprecated.
    Require the current request to use one of the methods listed.
  • Element Details

    • value

      com.atlassian.xwork.HttpMethod[] value
      Deprecated.
      Require the current request to use one of the methods listed.
      Returns:
      Array of HTTP methods that can be used to execute the given method.