Javadoc
This commit is contained in:
parent
428499a384
commit
a76bbae51d
|
@ -468,7 +468,7 @@ public interface RestOperations {
|
|||
* with the static builder methods on {@code RequestEntity}, for instance:
|
||||
* <pre class="code">
|
||||
* MyRequest body = ...
|
||||
* RequestEntity request = RequestEntity.post("http://example.com/{foo}", "bar").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);
|
||||
* </pre>
|
||||
* @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:
|
||||
* <pre class="code">
|
||||
* MyRequest body = ...
|
||||
* RequestEntity request = RequestEntity.post("http://example.com/{foo}", "bar").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);
|
||||
* </pre>
|
||||
|
|
Loading…
Reference in New Issue