Documentation
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1402 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
6b37493d2f
commit
6d259503cb
|
|
@ -105,7 +105,7 @@ public interface RestOperations {
|
||||||
URI postForLocation(String url, Object request, Map<String, String> uriVariables) throws RestClientException;
|
URI postForLocation(String url, Object request, Map<String, String> uriVariables) throws RestClientException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new resource by POSTing the given object to the URI template, and returns the converted representation
|
* Create a new resource by POSTing the given object to the URI template, and returns the representation
|
||||||
* found in the response. <p>URI Template variables are expanded using the given URI variables, if any.
|
* found in the response. <p>URI Template variables are expanded using the given URI variables, if any.
|
||||||
*
|
*
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
|
|
@ -116,7 +116,7 @@ public interface RestOperations {
|
||||||
throws RestClientException;
|
throws RestClientException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new resource by POSTing the given object to the URI template, and returns the converted representation
|
* Create a new resource by POSTing the given object to the URI template, and returns the representation
|
||||||
* found in the response. <p>URI Template variables are expanded using the given map.
|
* found in the response. <p>URI Template variables are expanded using the given map.
|
||||||
*
|
*
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,14 @@ import org.springframework.web.util.UriTemplate;
|
||||||
* enforces RESTful principles. It handles HTTP connections, leaving application code to provide URLs (with possible
|
* enforces RESTful principles. It handles HTTP connections, leaving application code to provide URLs (with possible
|
||||||
* template variables) and extract results.
|
* template variables) and extract results.
|
||||||
*
|
*
|
||||||
* <p>The main entry points of this template are the methods named after the six main HTTP methods: <table> <tr><th>HTTP
|
* <p>The main entry points of this template are the methods named after the six main HTTP methods:
|
||||||
|
* <table> <tr><th>HTTP
|
||||||
* method</th><th>RestTemplate methods</th></tr> <tr><td>DELETE</td><td>{@link #delete}</td></tr>
|
* method</th><th>RestTemplate methods</th></tr> <tr><td>DELETE</td><td>{@link #delete}</td></tr>
|
||||||
* <tr><td>GET</td><td>{@link #getForObject}</td></tr> <tr><td>HEAD</td><td>{@link #headForHeaders}</td></tr>
|
* <tr><td>GET</td><td>{@link #getForObject}</td></tr>
|
||||||
* <tr><td>OPTIONS</td><td>{@link #optionsForAllow}</td></tr> <tr><td>POST</td><td>{@link #postForLocation}</td></tr>
|
* <tr><td>HEAD</td><td>{@link #headForHeaders}</td></tr>
|
||||||
|
* <tr><td>OPTIONS</td><td>{@link #optionsForAllow}</td></tr>
|
||||||
|
* <tr><td>POST</td><td>{@link #postForLocation}</td></tr>
|
||||||
|
* <tr><td></td><td>{@link #postForObject}</td></tr>
|
||||||
* <tr><td>PUT</td><td>{@link #put}</td></tr> <tr><td>any</td><td>{@link #execute}</td></tr> </table>
|
* <tr><td>PUT</td><td>{@link #put}</td></tr> <tr><td>any</td><td>{@link #execute}</td></tr> </table>
|
||||||
*
|
*
|
||||||
* <p>Each of these methods takes {@linkplain UriTemplate uri template} arguments in two forms: as a {@code String}
|
* <p>Each of these methods takes {@linkplain UriTemplate uri template} arguments in two forms: as a {@code String}
|
||||||
|
|
|
||||||
|
|
@ -1368,6 +1368,15 @@ if (HttpStatus.SC_CREATED == post.getStatusCode()) {
|
||||||
url, Object request, String… urlVariables)</ulink></entry>
|
url, Object request, String… urlVariables)</ulink></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<entry></entry>
|
||||||
|
|
||||||
|
<entry><ulink
|
||||||
|
url="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/client/RestTemplate.html#postForObject(java.lang.String,%20java.lang.Object,%20java.lang.Class,%20java.lang.String...)">postForObject(String
|
||||||
|
url, Object request, Class<T> responseType, String…
|
||||||
|
uriVariables)</ulink></entry>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry>PUT</entry>
|
<entry>PUT</entry>
|
||||||
|
|
||||||
|
|
@ -1387,9 +1396,10 @@ if (HttpStatus.SC_CREATED == post.getStatusCode()) {
|
||||||
object. The method <methodname>postForLocation</methodname> will do a
|
object. The method <methodname>postForLocation</methodname> will do a
|
||||||
POST, converting the given object into a HTTP request and return the
|
POST, converting the given object into a HTTP request and return the
|
||||||
response HTTP Location header where the newly created object can be
|
response HTTP Location header where the newly created object can be
|
||||||
found In case of an exception processing the HTTP request, an exception
|
found. In case of an exception processing the HTTP request, an exception
|
||||||
of the type <classname>RestClientException</classname> will be
|
of the type <classname>RestClientException</classname> will be
|
||||||
thrown.</para>
|
thrown, this behavior can be changed by plugging in another <interfacename>ResponseErrorHandler</interfacename>
|
||||||
|
implementation into the <classname>RestTemplate</classname>.</para>
|
||||||
|
|
||||||
<para>Objects passed to and returned from these methods are converted to
|
<para>Objects passed to and returned from these methods are converted to
|
||||||
and from HTTP messages by
|
and from HTTP messages by
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue