spring-framework / org.springframework.web.filter / HttpPutFormContentFilter

HttpPutFormContentFilter

open class HttpPutFormContentFilter : OncePerRequestFilter

javax.servlet.Filter that makes form encoded data available through the ServletRequest.getParameter*() family of methods during HTTP PUT or PATCH requests.

The Servlet spec requires form data to be available for HTTP POST but not for HTTP PUT or PATCH requests. This filter intercepts HTTP PUT and PATCH requests where content type is 'application/x-www-form-urlencoded', reads form encoded content from the body of the request, and wraps the ServletRequest in order to make the form data available as request parameters just like it is for HTTP POST requests.

Author
Rossen Stoyanchev

Since
3.1

Constructors

<init>

HttpPutFormContentFilter()

javax.servlet.Filter that makes form encoded data available through the ServletRequest.getParameter*() family of methods during HTTP PUT or PATCH requests.

The Servlet spec requires form data to be available for HTTP POST but not for HTTP PUT or PATCH requests. This filter intercepts HTTP PUT and PATCH requests where content type is 'application/x-www-form-urlencoded', reads form encoded content from the body of the request, and wraps the ServletRequest in order to make the form data available as request parameters just like it is for HTTP POST requests.

Functions

getFormConverter

open fun getFormConverter(): FormHttpMessageConverter

setCharset

open fun setCharset(charset: Charset): Unit

The default character set to use for reading form data. This is a shortcut for: getFormConverter.setCharset(charset).

setFormConverter

open fun setFormConverter(converter: FormHttpMessageConverter): Unit

Set the converter to use for parsing form content.

By default this is an instnace of AllEncompassingFormHttpMessageConverter.