HiddenHttpMethodFilter (Grails 5.1.2)

Package: org.grails.web.filters

## [Java] Class HiddenHttpMethodFilter

- org.grails.web.filters.HiddenHttpMethodFilter

-     public class HiddenHttpMethodFilter
      extends org.springframework.web.filter.OncePerRequestFilter

  Based off the Spring implementation, but also supports the X-HTTP-Method-Override HTTP header.

  See Also:
    org.springframework.web.filter.HiddenHttpMethodFilter
  Authors:
    Graeme Rocher
  Since:
    1.2

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `protected static class` | `HiddenHttpMethodFilter.HttpMethodRequestWrapper` | Simple javax.servlet.http.HttpServletRequest wrapper that returns the supplied method for javax.servlet.http.HttpServletRequest#getMethod().

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `DEFAULT_METHOD_PARAM` | Default method parameter: `_method`
    `static java.lang.String` | `HEADER_X_HTTP_METHOD_OVERRIDE` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class org.springframework.web.filter.OncePerRequestFilter` | `ALREADY_FILTERED_SUFFIX`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)`
    `` | `protected java.lang.String` | `getHttpMethodOverride(javax.servlet.http.HttpServletRequest request)`
    `` | `public void` | `setMethodParam(java.lang.String methodParam)` Set the parameter name to look for HTTP methods.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.springframework.web.filter.OncePerRequestFilter` | `org.springframework.web.filter.OncePerRequestFilter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain), org.springframework.web.filter.OncePerRequestFilter#setServletContext(javax.servlet.ServletContext), org.springframework.web.filter.OncePerRequestFilter#getEnvironment(), org.springframework.web.filter.OncePerRequestFilter#setEnvironment(org.springframework.core.env.Environment), org.springframework.web.filter.OncePerRequestFilter#afterPropertiesSet(), org.springframework.web.filter.OncePerRequestFilter#setBeanName(java.lang.String), org.springframework.web.filter.OncePerRequestFilter#getFilterConfig(), org.springframework.web.filter.OncePerRequestFilter#init(javax.servlet.FilterConfig), org.springframework.web.filter.OncePerRequestFilter#destroy(), org.springframework.web.filter.OncePerRequestFilter#wait(long, int), org.springframework.web.filter.OncePerRequestFilter#wait(long), org.springframework.web.filter.OncePerRequestFilter#wait(), org.springframework.web.filter.OncePerRequestFilter#equals(java.lang.Object), org.springframework.web.filter.OncePerRequestFilter#toString(), org.springframework.web.filter.OncePerRequestFilter#hashCode(), org.springframework.web.filter.OncePerRequestFilter#getClass(), org.springframework.web.filter.OncePerRequestFilter#notify(), org.springframework.web.filter.OncePerRequestFilter#notifyAll()`

- - ### Field Detail

    - #### public static final java.lang.String DEFAULT_METHOD_PARAM

      Default method parameter: `_method`

    - #### public static final java.lang.String HEADER_X_HTTP_METHOD_OVERRIDE

  - ### Method Detail

    - #### @java.lang.Override protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)

    - #### protected java.lang.String getHttpMethodOverride(javax.servlet.http.HttpServletRequest request)

    - #### public void setMethodParam(java.lang.String methodParam)

      Set the parameter name to look for HTTP methods.

      See Also:
        DEFAULT_METHOD_PARAM