Add support for HTTP PATCH method

The HTTP PATCH method is now supported whereever HTTP methods are used.
Annotated controllers can be mapped to RequestMethod.PATCH.

On the client side the RestTemplate execute(..) and exchange(..)
methods can be used with HttpMethod.PATCH. In terms of HTTP client
libraries, Apache HttpComponents HttpClient version 4.2 or later is
required (see HTTPCLIENT-1191). The JDK HttpURLConnection does not
support the HTTP PATCH method.

Issue: SPR-7985
This commit is contained in:
Rossen Stoyanchev
2012-06-22 16:47:33 -04:00
parent f05e2bc56f
commit a0747458e7
18 changed files with 211 additions and 98 deletions

View File

@@ -1975,7 +1975,7 @@ public class EditPetForm {
<literal>ServletRequest.getParameter*()</literal> family of methods to
support form field access only for HTTP POST, not for HTTP PUT.</para>
<para>To support HTTP PUT requests, the <literal>spring-web</literal>
<para>To support HTTP PUT and PATCH requests, the <literal>spring-web</literal>
module provides the filter
<classname>HttpPutFormContentFilter</classname>, which can be
configured in <filename>web.xml</filename>:</para>
@@ -1995,7 +1995,7 @@ public class EditPetForm {
&lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
&lt;/servlet&gt;</programlisting>
<para>The above filter intercepts HTTP PUT requests with content type
<para>The above filter intercepts HTTP PUT and PATCH requests with content type
<literal>application/x-www-form-urlencoded</literal>, reads the form
data from the body of the request, and wraps the
<classname>ServletRequest</classname> in order to make the form data