1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2014 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -105,6 +105,7 @@ public interface RestOperations {
105
105
*/
106
106
<T > ResponseEntity <T > getForEntity (URI url , Class <T > responseType ) throws RestClientException ;
107
107
108
+
108
109
// HEAD
109
110
110
111
/**
@@ -132,6 +133,7 @@ public interface RestOperations {
132
133
*/
133
134
HttpHeaders headForHeaders (URI url ) throws RestClientException ;
134
135
136
+
135
137
// POST
136
138
137
139
/**
@@ -264,6 +266,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
264
266
*/
265
267
<T > ResponseEntity <T > postForEntity (URI url , Object request , Class <T > responseType ) throws RestClientException ;
266
268
269
+
267
270
// PUT
268
271
269
272
/**
@@ -300,6 +303,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
300
303
*/
301
304
void put (URI url , Object request ) throws RestClientException ;
302
305
306
+
303
307
// DELETE
304
308
305
309
/**
@@ -325,6 +329,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
325
329
*/
326
330
void delete (URI url ) throws RestClientException ;
327
331
332
+
328
333
// OPTIONS
329
334
330
335
/**
@@ -352,6 +357,7 @@ <T> ResponseEntity<T> postForEntity(String url, Object request, Class<T> respons
352
357
*/
353
358
Set <HttpMethod > optionsForAllow (URI url ) throws RestClientException ;
354
359
360
+
355
361
// exchange
356
362
357
363
/**
@@ -401,20 +407,18 @@ <T> ResponseEntity<T> exchange(URI url, HttpMethod method, HttpEntity<?> request
401
407
* Execute the HTTP method to the given URI template, writing the given
402
408
* request entity to the request, and returns the response as {@link ResponseEntity}.
403
409
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
404
- *
405
410
* <pre class="code">
406
411
* ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
407
412
* ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
408
413
* </pre>
409
- *
410
414
* @param url the URL
411
415
* @param method the HTTP method (GET, POST, etc)
412
416
* @param requestEntity the entity (headers and/or body) to write to the
413
417
* request, may be {@code null}
414
418
* @param responseType the type of the return value
415
419
* @param uriVariables the variables to expand in the template
416
420
* @return the response as entity
417
- * @since 3.2.0
421
+ * @since 3.2
418
422
*/
419
423
<T > ResponseEntity <T > exchange (String url ,HttpMethod method , HttpEntity <?> requestEntity ,
420
424
ParameterizedTypeReference <T > responseType , Object ... uriVariables ) throws RestClientException ;
@@ -423,19 +427,17 @@ <T> ResponseEntity<T> exchange(String url,HttpMethod method, HttpEntity<?> reque
423
427
* Execute the HTTP method to the given URI template, writing the given
424
428
* request entity to the request, and returns the response as {@link ResponseEntity}.
425
429
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
426
- *
427
430
* <pre class="code">
428
431
* ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
429
432
* ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
430
433
* </pre>
431
- *
432
434
* @param url the URL
433
435
* @param method the HTTP method (GET, POST, etc)
434
436
* @param requestEntity the entity (headers and/or body) to write to the request, may be {@code null}
435
437
* @param responseType the type of the return value
436
438
* @param uriVariables the variables to expand in the template
437
439
* @return the response as entity
438
- * @since 3.2.0
440
+ * @since 3.2
439
441
*/
440
442
<T > ResponseEntity <T > exchange (String url , HttpMethod method , HttpEntity <?> requestEntity ,
441
443
ParameterizedTypeReference <T > responseType , Map <String , ?> uriVariables ) throws RestClientException ;
@@ -444,22 +446,21 @@ <T> ResponseEntity<T> exchange(String url, HttpMethod method, HttpEntity<?> requ
444
446
* Execute the HTTP method to the given URI template, writing the given
445
447
* request entity to the request, and returns the response as {@link ResponseEntity}.
446
448
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
447
- *
448
449
* <pre class="code">
449
450
* ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
450
451
* ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
451
452
* </pre>
452
- *
453
453
* @param url the URL
454
454
* @param method the HTTP method (GET, POST, etc)
455
455
* @param requestEntity the entity (headers and/or body) to write to the request, may be {@code null}
456
456
* @param responseType the type of the return value
457
457
* @return the response as entity
458
- * @since 3.2.0
458
+ * @since 3.2
459
459
*/
460
460
<T > ResponseEntity <T > exchange (URI url , HttpMethod method , HttpEntity <?> requestEntity ,
461
461
ParameterizedTypeReference <T > responseType ) throws RestClientException ;
462
462
463
+
463
464
// general execution
464
465
465
466
/**
0 commit comments