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