public static String getRealHttpMethod ( ServletRequest req ) { HttpServletRequest httpRequest = ( HttpServletRequest ) req ; String method = ( String ) httpRequest . getAttribute ( HTTP_METHOD_OVERRIDE_ATTRIBUTE ) ; if ( method != null ) { return method ; } return httpRequest . getMethod ( ) ; }
Get the real HTTP method for the request taking into account the X - HTTP - Method - Override header .