11/*
2- * Copyright 2002-2012 the original author or authors.
2+ * Copyright 2002-2014 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -105,6 +105,7 @@ public interface RestOperations {
105105 */
106106 <T > ResponseEntity <T > getForEntity (URI url , Class <T > responseType ) throws RestClientException ;
107107
108+
108109 // HEAD
109110
110111 /**
@@ -132,6 +133,7 @@ public interface RestOperations {
132133 */
133134 HttpHeaders headForHeaders (URI url ) throws RestClientException ;
134135
136+
135137 // POST
136138
137139 /**
@@ -264,6 +266,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
264266 */
265267 <T > ResponseEntity <T > postForEntity (URI url , Object request , Class <T > responseType ) throws RestClientException ;
266268
269+
267270 // PUT
268271
269272 /**
@@ -300,6 +303,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
300303 */
301304 void put (URI url , Object request ) throws RestClientException ;
302305
306+
303307 // DELETE
304308
305309 /**
@@ -325,6 +329,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
325329 */
326330 void delete (URI url ) throws RestClientException ;
327331
332+
328333 // OPTIONS
329334
330335 /**
@@ -352,6 +357,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
352357 */
353358 Set <HttpMethod > optionsForAllow (URI url ) throws RestClientException ;
354359
360+
355361 // exchange
356362
357363 /**
@@ -401,20 +407,18 @@ <T> ResponseEntity<T> exchange(URI url, HttpMethod method, HttpEntity<?> request
401407 * Execute the HTTP method to the given URI template, writing the given
402408 * request entity to the request, and returns the response as {@link ResponseEntity}.
403409 * The given {@link ParameterizedTypeReference} is used to pass generic type information:
404- *
405410 * <pre class="code">
406411 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
407412 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
408413 * </pre>
409- *
410414 * @param url the URL
411415 * @param method the HTTP method (GET, POST, etc)
412416 * @param requestEntity the entity (headers and/or body) to write to the
413417 * request, may be {@code null}
414418 * @param responseType the type of the return value
415419 * @param uriVariables the variables to expand in the template
416420 * @return the response as entity
417- * @since 3.2.0
421+ * @since 3.2
418422 */
419423 <T > ResponseEntity <T > exchange (String url ,HttpMethod method , HttpEntity <?> requestEntity ,
420424 ParameterizedTypeReference <T > responseType , Object ... uriVariables ) throws RestClientException ;
@@ -423,19 +427,17 @@ <T> ResponseEntity<T> exchange(String url,HttpMethod method, HttpEntity<?> reque
423427 * Execute the HTTP method to the given URI template, writing the given
424428 * request entity to the request, and returns the response as {@link ResponseEntity}.
425429 * The given {@link ParameterizedTypeReference} is used to pass generic type information:
426- *
427430 * <pre class="code">
428431 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
429432 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
430433 * </pre>
431- *
432434 * @param url the URL
433435 * @param method the HTTP method (GET, POST, etc)
434436 * @param requestEntity the entity (headers and/or body) to write to the request, may be {@code null}
435437 * @param responseType the type of the return value
436438 * @param uriVariables the variables to expand in the template
437439 * @return the response as entity
438- * @since 3.2.0
440+ * @since 3.2
439441 */
440442 <T > ResponseEntity <T > exchange (String url , HttpMethod method , HttpEntity <?> requestEntity ,
441443 ParameterizedTypeReference <T > responseType , Map <String , ?> uriVariables ) throws RestClientException ;
@@ -444,22 +446,21 @@ <T> ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requ
444446 * Execute the HTTP method to the given URI template, writing the given
445447 * request entity to the request, and returns the response as {@link ResponseEntity}.
446448 * The given {@link ParameterizedTypeReference} is used to pass generic type information:
447- *
448449 * <pre class="code">
449450 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
450451 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
451452 * </pre>
452- *
453453 * @param url the URL
454454 * @param method the HTTP method (GET, POST, etc)
455455 * @param requestEntity the entity (headers and/or body) to write to the request, may be {@code null}
456456 * @param responseType the type of the return value
457457 * @return the response as entity
458- * @since 3.2.0
458+ * @since 3.2
459459 */
460460 <T > ResponseEntity <T > exchange (URI url , HttpMethod method , HttpEntity <?> requestEntity ,
461461 ParameterizedTypeReference <T > responseType ) throws RestClientException ;
462462
463+
463464 // general execution
464465
465466 /**
0 commit comments