This filter may be used to replace a POST request with a PUT, DELETE or GET request.
Replacement will occur if the request method is POST and there exists either a request header "X-HTTP-Method-Override", or a query parameter "_method" with a non-empty value. That value will be the HTTP method that replaces the POST method. In addition to that, when replacing the POST method with GET, the filter will convert the form parameters to query parameters. If the filter is configured to look for both the X-HTTP-Method-Override header as well as the _method query parameter (the default setting), both are present in the request and they differ, the filter returns {@link javax.ws.rs.core.Response.Status#BAD_REQUEST} response.
The filter behavior can be configured using {@link org.glassfish.jersey.server.ServerProperties#HTTP_METHOD_OVERRIDE}property.
@author Paul Sandoz (paul.sandoz at oracle.com) @author Martin Matula (martin.matula at oracle.com) @author Fredy Nagy @author Florian Hars (florian at hars.de)
|
|