@ -1159,7 +1159,7 @@ on preparing URIs or customizing how the `RestTemplate` expands URI templates, s
@@ -1159,7 +1159,7 @@ on preparing URIs or customizing how the `RestTemplate` expands URI templates, s
===== Dealing with request and response headers
Besides the methods described above, the `RestTemplate` also has the `exchange()`
method, which can be used for arbitrary HTTP method execution based on the `HttpEntity`
method, which can be used for arbitrary HTTP method execution based on the `RequestEntity`
class.
Perhaps most importantly, the `exchange()` method can be used to add request headers and
@ -1168,13 +1168,14 @@ read response headers. For example:
@@ -1168,13 +1168,14 @@ read response headers. For example:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("MyRequestHeader", "MyValue");
HttpEntity<?> requestEntity = new HttpEntity(requestHeaders);
@ -1195,8 +1196,11 @@ to serialize only a subset of the object properties. For example:
@@ -1195,8 +1196,11 @@ to serialize only a subset of the object properties. For example:
----
MappingJacksonValue value = new MappingJacksonValue(new User("eric", "7!jd#h23"));