@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2012 the original author or authors .
* Copyright 2002 - 2014 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -105,6 +105,7 @@ public interface RestOperations {
@@ -105,6 +105,7 @@ public interface RestOperations {
* /
< T > ResponseEntity < T > getForEntity ( URI url , Class < T > responseType ) throws RestClientException ;
// HEAD
/ * *
@ -132,6 +133,7 @@ public interface RestOperations {
@@ -132,6 +133,7 @@ public interface RestOperations {
* /
HttpHeaders headForHeaders ( URI url ) throws RestClientException ;
// POST
/ * *
@ -264,6 +266,7 @@ public interface RestOperations {
@@ -264,6 +266,7 @@ public interface RestOperations {
* /
< T > ResponseEntity < T > postForEntity ( URI url , Object request , Class < T > responseType ) throws RestClientException ;
// PUT
/ * *
@ -300,6 +303,7 @@ public interface RestOperations {
@@ -300,6 +303,7 @@ public interface RestOperations {
* /
void put ( URI url , Object request ) throws RestClientException ;
// DELETE
/ * *
@ -325,6 +329,7 @@ public interface RestOperations {
@@ -325,6 +329,7 @@ public interface RestOperations {
* /
void delete ( URI url ) throws RestClientException ;
// OPTIONS
/ * *
@ -352,6 +357,7 @@ public interface RestOperations {
@@ -352,6 +357,7 @@ public interface RestOperations {
* /
Set < HttpMethod > optionsForAllow ( URI url ) throws RestClientException ;
// exchange
/ * *
@ -401,12 +407,10 @@ public interface RestOperations {
@@ -401,12 +407,10 @@ public interface RestOperations {
* Execute the HTTP method to the given URI template , writing the given
* request entity to the request , and returns the response as { @link ResponseEntity } .
* The given { @link ParameterizedTypeReference } is used to pass generic type information :
*
* < pre class = "code" >
* ParameterizedTypeReference & lt ; List & lt ; MyBean & gt ; & gt ; myBean = new ParameterizedTypeReference & lt ; List & lt ; MyBean & gt ; & gt ; ( ) { } ;
* ResponseEntity & lt ; List & lt ; MyBean & gt ; & gt ; response = template . exchange ( & quot ; http : //example.com",HttpMethod.GET, null, myBean);
* < / pre >
*
* @param url the URL
* @param method the HTTP method ( GET , POST , etc )
* @param requestEntity the entity ( headers and / or body ) to write to the
@ -414,7 +418,7 @@ public interface RestOperations {
@@ -414,7 +418,7 @@ public interface RestOperations {
* @param responseType the type of the return value
* @param uriVariables the variables to expand in the template
* @return the response as entity
* @since 3 . 2 . 0
* @since 3 . 2
* /
< T > ResponseEntity < T > exchange ( String url , HttpMethod method , HttpEntity < ? > requestEntity ,
ParameterizedTypeReference < T > responseType , Object . . . uriVariables ) throws RestClientException ;
@ -423,19 +427,17 @@ public interface RestOperations {
@@ -423,19 +427,17 @@ public interface RestOperations {
* Execute the HTTP method to the given URI template , writing the given
* request entity to the request , and returns the response as { @link ResponseEntity } .
* The given { @link ParameterizedTypeReference } is used to pass generic type information :
*
* < pre class = "code" >
* ParameterizedTypeReference & lt ; List & lt ; MyBean & gt ; & gt ; myBean = new ParameterizedTypeReference & lt ; List & lt ; MyBean & gt ; & gt ; ( ) { } ;
* ResponseEntity & lt ; List & lt ; MyBean & gt ; & gt ; response = template . exchange ( & quot ; http : //example.com",HttpMethod.GET, null, myBean);
* < / pre >
*
* @param url the URL
* @param method the HTTP method ( GET , POST , etc )
* @param requestEntity the entity ( headers and / or body ) to write to the request , may be { @code null }
* @param responseType the type of the return value
* @param uriVariables the variables to expand in the template
* @return the response as entity
* @since 3 . 2 . 0
* @since 3 . 2
* /
< T > ResponseEntity < T > exchange ( String url , HttpMethod method , HttpEntity < ? > requestEntity ,
ParameterizedTypeReference < T > responseType , Map < String , ? > uriVariables ) throws RestClientException ;
@ -444,22 +446,21 @@ public interface RestOperations {
@@ -444,22 +446,21 @@ public interface RestOperations {
* Execute the HTTP method to the given URI template , writing the given
* request entity to the request , and returns the response as { @link ResponseEntity } .
* The given { @link ParameterizedTypeReference } is used to pass generic type information :
*
* < pre class = "code" >
* ParameterizedTypeReference & lt ; List & lt ; MyBean & gt ; & gt ; myBean = new ParameterizedTypeReference & lt ; List & lt ; MyBean & gt ; & gt ; ( ) { } ;
* ResponseEntity & lt ; List & lt ; MyBean & gt ; & gt ; response = template . exchange ( & quot ; http : //example.com",HttpMethod.GET, null, myBean);
* < / pre >
*
* @param url the URL
* @param method the HTTP method ( GET , POST , etc )
* @param requestEntity the entity ( headers and / or body ) to write to the request , may be { @code null }
* @param responseType the type of the return value
* @return the response as entity
* @since 3 . 2 . 0
* @since 3 . 2
* /
< T > ResponseEntity < T > exchange ( URI url , HttpMethod method , HttpEntity < ? > requestEntity ,
ParameterizedTypeReference < T > responseType ) throws RestClientException ;
// general execution
/ * *