diff --git a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java index 315def65e87..e684dd6aa19 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java @@ -468,7 +468,7 @@ public interface RestOperations { * with the static builder methods on {@code RequestEntity}, for instance: *
* MyRequest body = ...
- * RequestEntity request = RequestEntity.post(new URI("http://example.com/foo").accept(MediaType.APPLICATION_JSON).body(body);
+ * RequestEntity request = RequestEntity.post(new URI("http://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
* ResponseEntity<MyResponse> response = template.exchange(request, MyResponse.class);
*
* @param requestEntity the entity to write to the request
@@ -484,7 +484,7 @@ public interface RestOperations {
* {@link ParameterizedTypeReference} is used to pass generic type information:
*
* MyRequest body = ...
- * RequestEntity request = RequestEntity.post(new URI("http://example.com/foo").accept(MediaType.APPLICATION_JSON).body(body);
+ * RequestEntity request = RequestEntity.post(new URI("http://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
* ParameterizedTypeReference<List<MyResponse>> myBean = new ParameterizedTypeReference<List<MyResponse>>() {};
* ResponseEntity<List<MyResponse>> response = template.exchange(request, myBean);
*