This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch http-interceptor in repository https://gitbox.apache.org/repos/asf/struts.git
commit da57a04025e009e8036e5e7e068971e49d9df545 Author: Lukasz Lenart <[email protected]> AuthorDate: Sat Apr 19 17:46:59 2014 +0200 Defined enum with all http methods --- .../struts2/interceptor/httpmethod/HttpMethod.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java new file mode 100644 index 000000000..30f4ea3d6 --- /dev/null +++ b/core/src/main/java/org/apache/struts2/interceptor/httpmethod/HttpMethod.java @@ -0,0 +1,19 @@ +package org.apache.struts2.interceptor.httpmethod; + +public enum HttpMethod { + + GET, + HEAD, + POST, + PUT, + DELETE, + TRACE, + OPTIONS, + CONNECT, + PATCH; + + public static HttpMethod parse(String httpRequestMethod) { + return valueOf(httpRequestMethod.toUpperCase()); + } + +}
