Is there a standard constant in Java used to refer to HTTP request methods?

Possible duplicate:
Where are the request method constants in the servlet API?

I am looking for a Java string constant to reference HTTP request methods (GET, POST, PUT, etc.). I was expecting an HttpServlet or HttpServletRequest to have constants for these methods, but this does not seem to be the case.

+3
source share
2 answers

Java Spring RequestMapping . 13.11.3 : http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#mvc-annotation

, HTTP-:

@RequestMapping(method = RequestMethod.GET)
@RequestMapping(method = RequestMethod.POST)
@RequestMapping(method = RequestMethod.PUT)

RequestMethod: http://apollo89.com/java/spring-framework-2.5.3/api/org/springframework/web/bind/annotation/RequestMethod.html

+2

Source: https://habr.com/ru/post/1742199/


All Articles