From bf65d900298e96bf234263959671915f16942c91 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Fri, 12 Mar 2010 09:07:29 +0000 Subject: [PATCH] SPR-5866 - RestTemplate - access to Request Headers git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3090 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../web/client/RestOperations.java | 12 ++++++------ .../web/client/RestTemplate.java | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/org.springframework.web/src/main/java/org/springframework/web/client/RestOperations.java b/org.springframework.web/src/main/java/org/springframework/web/client/RestOperations.java index da7c7292253..be97e6be9e1 100644 --- a/org.springframework.web/src/main/java/org/springframework/web/client/RestOperations.java +++ b/org.springframework.web/src/main/java/org/springframework/web/client/RestOperations.java @@ -364,8 +364,8 @@ public interface RestOperations { * @return the response as entity * @since 3.0.2 */ - HttpEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, - Class responseType, Object... uriVariables) throws RestClientException; + HttpEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, + Class responseType, Object... uriVariables) throws RestClientException; /** * Execute the HTTP method to the given URI template, writing the given request entity to the request, and @@ -379,8 +379,8 @@ public interface RestOperations { * @return the response as entity * @since 3.0.2 */ - HttpEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, - Class responseType, Map uriVariables) throws RestClientException; + HttpEntity exchange(String url, HttpMethod method, HttpEntity requestEntity, + Class responseType, Map uriVariables) throws RestClientException; /** * Execute the HTTP method to the given URI template, writing the given request entity to the request, and @@ -392,8 +392,8 @@ public interface RestOperations { * @return the response as entity * @since 3.0.2 */ - HttpEntity exchange(URI url, HttpMethod method, HttpEntity requestEntity, - Class responseType) throws RestClientException; + HttpEntity exchange(URI url, HttpMethod method, HttpEntity requestEntity, + Class responseType) throws RestClientException; // general execution diff --git a/org.springframework.web/src/main/java/org/springframework/web/client/RestTemplate.java b/org.springframework.web/src/main/java/org/springframework/web/client/RestTemplate.java index 5d516fa8ab6..6a65db1a340 100644 --- a/org.springframework.web/src/main/java/org/springframework/web/client/RestTemplate.java +++ b/org.springframework.web/src/main/java/org/springframework/web/client/RestTemplate.java @@ -363,24 +363,24 @@ public class RestTemplate extends HttpAccessor implements RestOperations { // exchange - public HttpEntity exchange(String url, HttpMethod method, - HttpEntity requestEntity, Class responseType, Object... uriVariables) throws RestClientException { + public HttpEntity exchange(String url, HttpMethod method, + HttpEntity requestEntity, Class responseType, Object... uriVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(requestEntity, responseType); - HttpEntityResponseExtractor responseExtractor = new HttpEntityResponseExtractor(responseType); + HttpEntityResponseExtractor responseExtractor = new HttpEntityResponseExtractor(responseType); return execute(url, method, requestCallback, responseExtractor, uriVariables); } - public HttpEntity exchange(String url, HttpMethod method, - HttpEntity requestEntity, Class responseType, Map uriVariables) throws RestClientException { + public HttpEntity exchange(String url, HttpMethod method, + HttpEntity requestEntity, Class responseType, Map uriVariables) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(requestEntity, responseType); - HttpEntityResponseExtractor responseExtractor = new HttpEntityResponseExtractor(responseType); + HttpEntityResponseExtractor responseExtractor = new HttpEntityResponseExtractor(responseType); return execute(url, method, requestCallback, responseExtractor, uriVariables); } - public HttpEntity exchange(URI url, HttpMethod method, HttpEntity requestEntity, - Class responseType) throws RestClientException { + public HttpEntity exchange(URI url, HttpMethod method, HttpEntity requestEntity, + Class responseType) throws RestClientException { HttpEntityRequestCallback requestCallback = new HttpEntityRequestCallback(requestEntity, responseType); - HttpEntityResponseExtractor responseExtractor = new HttpEntityResponseExtractor(responseType); + HttpEntityResponseExtractor responseExtractor = new HttpEntityResponseExtractor(responseType); return execute(url, method, requestCallback, responseExtractor); }