public class PostReplaceFilter extends java.lang.Object implements ContainerRequestFilter
This filter may be used to replace a POST request with a PUT or DELETE request.
Replacement will occur if the request method is POST and there exists an a request header "X-HTTP-Method-Override" with a non-empty value. That value will be the HTTP method that replaces the POST method.
When an application is deployed as a Servlet or Filter this Jersey filter can be registered using the following initialization parameter:
<init-param>
<param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
<param-value>com.sun.jersey.api.container.filter.PostReplaceFilter</param-value>
</init-param>
TODO support query parameter for declaring the replacing method.
com.sun.jersey.api.container.filter| Constructor and Description |
|---|
PostReplaceFilter() |
| Modifier and Type | Method and Description |
|---|---|
ContainerRequest |
filter(ContainerRequest request)
Filter the request.
|
public ContainerRequest filter(ContainerRequest request)
ContainerRequestFilterAn implementation may modify the state of the request or create a new instance.
filter in interface ContainerRequestFilterrequest - the request.Copyright © 2015 Oracle Corporation. All Rights Reserved.