1
1
/*
2
- * Copyright 2002-2023 the original author or authors.
2
+ * Copyright 2002-2024 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.
@@ -145,7 +145,7 @@ <T> ResponseEntity<T> getForEntity(String url, Class<T> responseType, Map<String
145
145
// POST
146
146
147
147
/**
148
- * Create a new resource by POSTing the given object to the URI template, and returns the value of
148
+ * Create a new resource by POSTing the given object to the URI template, and return the value of
149
149
* the {@code Location} header. This header typically indicates where the new resource is stored.
150
150
* <p>URI Template variables are expanded using the given URI variables, if any.
151
151
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
@@ -165,7 +165,7 @@ <T> ResponseEntity<T> getForEntity(String url, Class<T> responseType, Map<String
165
165
URI postForLocation (String url , @ Nullable Object request , Object ... uriVariables ) throws RestClientException ;
166
166
167
167
/**
168
- * Create a new resource by POSTing the given object to the URI template, and returns the value of
168
+ * Create a new resource by POSTing the given object to the URI template, and return the value of
169
169
* the {@code Location} header. This header typically indicates where the new resource is stored.
170
170
* <p>URI Template variables are expanded using the given map.
171
171
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
@@ -186,7 +186,7 @@ URI postForLocation(String url, @Nullable Object request, Map<String, ?> uriVari
186
186
throws RestClientException ;
187
187
188
188
/**
189
- * Create a new resource by POSTing the given object to the URL, and returns the value of the
189
+ * Create a new resource by POSTing the given object to the URL, and return the value of the
190
190
* {@code Location} header. This header typically indicates where the new resource is stored.
191
191
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
192
192
* add additional HTTP headers to the request.
@@ -205,7 +205,7 @@ URI postForLocation(String url, @Nullable Object request, Map<String, ?> uriVari
205
205
206
206
/**
207
207
* Create a new resource by POSTing the given object to the URI template,
208
- * and returns the representation found in the response.
208
+ * and return the representation found in the response.
209
209
* <p>URI Template variables are expanded using the given URI variables, if any.
210
210
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
211
211
* add additional HTTP headers to the request.
@@ -227,7 +227,7 @@ <T> T postForObject(String url, @Nullable Object request, Class<T> responseType,
227
227
228
228
/**
229
229
* Create a new resource by POSTing the given object to the URI template,
230
- * and returns the representation found in the response.
230
+ * and return the representation found in the response.
231
231
* <p>URI Template variables are expanded using the given map.
232
232
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
233
233
* add additional HTTP headers to the request.
@@ -249,7 +249,7 @@ <T> T postForObject(String url, @Nullable Object request, Class<T> responseType,
249
249
250
250
/**
251
251
* Create a new resource by POSTing the given object to the URL,
252
- * and returns the representation found in the response.
252
+ * and return the representation found in the response.
253
253
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
254
254
* add additional HTTP headers to the request.
255
255
* <p>The body of the entity, or {@code request} itself, can be a
@@ -268,7 +268,7 @@ <T> T postForObject(String url, @Nullable Object request, Class<T> responseType,
268
268
269
269
/**
270
270
* Create a new resource by POSTing the given object to the URI template,
271
- * and returns the response as {@link ResponseEntity}.
271
+ * and return the response as {@link ResponseEntity}.
272
272
* <p>URI Template variables are expanded using the given URI variables, if any.
273
273
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
274
274
* add additional HTTP headers to the request.
@@ -289,7 +289,7 @@ <T> ResponseEntity<T> postForEntity(String url, @Nullable Object request, Class<
289
289
290
290
/**
291
291
* Create a new resource by POSTing the given object to the URI template,
292
- * and returns the response as {@link HttpEntity}.
292
+ * and return the response as {@link HttpEntity}.
293
293
* <p>URI Template variables are expanded using the given map.
294
294
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
295
295
* add additional HTTP headers to the request.
@@ -310,7 +310,7 @@ <T> ResponseEntity<T> postForEntity(String url, @Nullable Object request, Class<
310
310
311
311
/**
312
312
* Create a new resource by POSTing the given object to the URL,
313
- * and returns the response as {@link ResponseEntity}.
313
+ * and return the response as {@link ResponseEntity}.
314
314
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
315
315
* add additional HTTP headers to the request.
316
316
* <p>The body of the entity, or {@code request} itself, can be a
@@ -374,7 +374,7 @@ <T> ResponseEntity<T> postForEntity(URI url, @Nullable Object request, Class<T>
374
374
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
375
375
* add additional HTTP headers to the request.
376
376
* <p><b>NOTE: The standard JDK HTTP library does not support HTTP PATCH.
377
- * You need to use the Apache HttpComponents or OkHttp request factory.</b>
377
+ * You need to use e.g. the Apache HttpComponents request factory.</b>
378
378
* @param url the URL
379
379
* @param request the object to be PATCHed (may be {@code null})
380
380
* @param responseType the type of the return value
@@ -384,7 +384,6 @@ <T> ResponseEntity<T> postForEntity(URI url, @Nullable Object request, Class<T>
384
384
* @see HttpEntity
385
385
* @see RestTemplate#setRequestFactory
386
386
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
387
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
388
387
*/
389
388
@ Nullable
390
389
<T > T patchForObject (String url , @ Nullable Object request , Class <T > responseType , Object ... uriVariables )
@@ -397,7 +396,7 @@ <T> T patchForObject(String url, @Nullable Object request, Class<T> responseType
397
396
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
398
397
* add additional HTTP headers to the request.
399
398
* <p><b>NOTE: The standard JDK HTTP library does not support HTTP PATCH.
400
- * You need to use the Apache HttpComponents or OkHttp request factory.</b>
399
+ * You need to use e.g. the Apache HttpComponents request factory.</b>
401
400
* @param url the URL
402
401
* @param request the object to be PATCHed (may be {@code null})
403
402
* @param responseType the type of the return value
@@ -407,7 +406,6 @@ <T> T patchForObject(String url, @Nullable Object request, Class<T> responseType
407
406
* @see HttpEntity
408
407
* @see RestTemplate#setRequestFactory
409
408
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
410
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
411
409
*/
412
410
@ Nullable
413
411
<T > T patchForObject (String url , @ Nullable Object request , Class <T > responseType ,
@@ -419,7 +417,7 @@ <T> T patchForObject(String url, @Nullable Object request, Class<T> responseType
419
417
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
420
418
* add additional HTTP headers to the request.
421
419
* <p><b>NOTE: The standard JDK HTTP library does not support HTTP PATCH.
422
- * You need to use the Apache HttpComponents or OkHttp request factory.</b>
420
+ * You need to use e.g. the Apache HttpComponents request factory.</b>
423
421
* @param url the URL
424
422
* @param request the object to be PATCHed (may be {@code null})
425
423
* @param responseType the type of the return value
@@ -428,7 +426,6 @@ <T> T patchForObject(String url, @Nullable Object request, Class<T> responseType
428
426
* @see HttpEntity
429
427
* @see RestTemplate#setRequestFactory
430
428
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
431
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
432
429
*/
433
430
@ Nullable
434
431
<T > T patchForObject (URI url , @ Nullable Object request , Class <T > responseType )
@@ -492,8 +489,8 @@ <T> T patchForObject(URI url, @Nullable Object request, Class<T> responseType)
492
489
// exchange
493
490
494
491
/**
495
- * Execute the HTTP method to the given URI template, writing the given request entity to the request, and
496
- * returns the response as {@link ResponseEntity}.
492
+ * Execute the HTTP method to the given URI template, writing the given request entity to the request,
493
+ * and return the response as {@link ResponseEntity}.
497
494
* <p>URI Template variables are expanded using the given URI variables, if any.
498
495
* @param url the URL
499
496
* @param method the HTTP method (GET, POST, etc)
@@ -508,8 +505,8 @@ <T> ResponseEntity<T> exchange(String url, HttpMethod method, @Nullable HttpEnti
508
505
Class <T > responseType , Object ... uriVariables ) throws RestClientException ;
509
506
510
507
/**
511
- * Execute the HTTP method to the given URI template, writing the given request entity to the request, and
512
- * returns the response as {@link ResponseEntity}.
508
+ * Execute the HTTP method to the given URI template, writing the given request entity to the request,
509
+ * and return the response as {@link ResponseEntity}.
513
510
* <p>URI Template variables are expanded using the given URI variables, if any.
514
511
* @param url the URL
515
512
* @param method the HTTP method (GET, POST, etc)
@@ -524,8 +521,8 @@ <T> ResponseEntity<T> exchange(String url, HttpMethod method, @Nullable HttpEnti
524
521
Class <T > responseType , Map <String , ?> uriVariables ) throws RestClientException ;
525
522
526
523
/**
527
- * Execute the HTTP method to the given URI template, writing the given request entity to the request, and
528
- * returns the response as {@link ResponseEntity}.
524
+ * Execute the HTTP method to the given URI template, writing the given request entity to the request,
525
+ * and return the response as {@link ResponseEntity}.
529
526
* @param url the URL
530
527
* @param method the HTTP method (GET, POST, etc)
531
528
* @param requestEntity the entity (headers and/or body) to write to the request
@@ -539,7 +536,7 @@ <T> ResponseEntity<T> exchange(URI url, HttpMethod method, @Nullable HttpEntity<
539
536
540
537
/**
541
538
* Execute the HTTP method to the given URI template, writing the given
542
- * request entity to the request, and returns the response as {@link ResponseEntity}.
539
+ * request entity to the request, and return the response as {@link ResponseEntity}.
543
540
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
544
541
* <pre class="code">
545
542
* ParameterizedTypeReference<List<MyBean>> myBean =
@@ -562,7 +559,7 @@ <T> ResponseEntity<T> exchange(String url,HttpMethod method, @Nullable HttpEntit
562
559
563
560
/**
564
561
* Execute the HTTP method to the given URI template, writing the given
565
- * request entity to the request, and returns the response as {@link ResponseEntity}.
562
+ * request entity to the request, and return the response as {@link ResponseEntity}.
566
563
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
567
564
* <pre class="code">
568
565
* ParameterizedTypeReference<List<MyBean>> myBean =
@@ -585,7 +582,7 @@ <T> ResponseEntity<T> exchange(String url, HttpMethod method, @Nullable HttpEnti
585
582
586
583
/**
587
584
* Execute the HTTP method to the given URI template, writing the given
588
- * request entity to the request, and returns the response as {@link ResponseEntity}.
585
+ * request entity to the request, and return the response as {@link ResponseEntity}.
589
586
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
590
587
* <pre class="code">
591
588
* ParameterizedTypeReference<List<MyBean>> myBean =
0 commit comments