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.
23
23
import java .util .List ;
24
24
import java .util .Map ;
25
25
26
- import org .reactivestreams .Publisher ;
27
-
28
- import org .springframework .core .ParameterizedTypeReference ;
29
- import org .springframework .core .ResolvableType ;
30
26
import org .springframework .http .HttpEntity ;
31
27
import org .springframework .http .HttpHeaders ;
32
28
import org .springframework .http .HttpMethod ;
@@ -80,22 +76,6 @@ public class HttpRequestValues {
80
76
private final Object bodyValue ;
81
77
82
78
83
- /**
84
- * Constructor without UriBuilderFactory.
85
- * @deprecated in favour of
86
- * {@link HttpRequestValues#HttpRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)}
87
- * to be removed in 6.2.
88
- */
89
- @ Deprecated (since = "6.1" , forRemoval = true )
90
- protected HttpRequestValues (@ Nullable HttpMethod httpMethod ,
91
- @ Nullable URI uri , @ Nullable String uriTemplate ,
92
- Map <String , String > uriVariables ,
93
- HttpHeaders headers , MultiValueMap <String , String > cookies , Map <String , Object > attributes ,
94
- @ Nullable Object bodyValue ) {
95
-
96
- this (httpMethod , uri , null , uriTemplate , uriVariables , headers , cookies , attributes , bodyValue );
97
- }
98
-
99
79
/**
100
80
* Construct {@link HttpRequestValues}.
101
81
* @since 6.1
@@ -197,30 +177,6 @@ public Object getBodyValue() {
197
177
return this .bodyValue ;
198
178
}
199
179
200
- /**
201
- * Return the request body as a Publisher.
202
- * <p>This is mutually exclusive with {@link #getBodyValue()}.
203
- * Only one of the two or neither is set.
204
- * @deprecated in favor of {@link ReactiveHttpRequestValues#getBodyPublisher()};
205
- * to be removed in 6.2
206
- */
207
- @ Deprecated (since = "6.1" , forRemoval = true )
208
- @ Nullable
209
- public Publisher <?> getBody () {
210
- throw new UnsupportedOperationException ();
211
- }
212
-
213
- /**
214
- * Return the element type for a Publisher body.
215
- * @deprecated in favor of {@link ReactiveHttpRequestValues#getBodyPublisherElementType()};
216
- * to be removed in 6.2
217
- */
218
- @ Deprecated (since = "6.1" , forRemoval = true )
219
- @ Nullable
220
- public ParameterizedTypeReference <?> getBodyElementType () {
221
- throw new UnsupportedOperationException ();
222
- }
223
-
224
180
225
181
public static Builder builder () {
226
182
return new Builder ();
@@ -383,17 +339,6 @@ public Builder addRequestPart(String name, Object part) {
383
339
return this ;
384
340
}
385
341
386
- /**
387
- * Variant of {@link #addRequestPart(String, Object)} that allows the
388
- * part value to be produced by a {@link Publisher}.
389
- * @deprecated in favor of {@link ReactiveHttpRequestValues.Builder#addRequestPartPublisher};
390
- * to be removed in 6.2
391
- */
392
- @ Deprecated (since = "6.1" , forRemoval = true )
393
- public <T , P extends Publisher <T >> Builder addRequestPart (String name , P publisher , ResolvableType type ) {
394
- throw new UnsupportedOperationException ();
395
- }
396
-
397
342
/**
398
343
* Configure an attribute to associate with the request.
399
344
* @param name the attribute name
@@ -412,18 +357,6 @@ public void setBodyValue(@Nullable Object bodyValue) {
412
357
this .bodyValue = bodyValue ;
413
358
}
414
359
415
- /**
416
- * Set the request body as a Reactive Streams Publisher.
417
- * <p>This is mutually exclusive with, and resets any previously set
418
- * {@linkplain #setBodyValue(Object) body value}.
419
- * @deprecated in favor of {@link ReactiveHttpRequestValues.Builder#setBodyPublisher};
420
- * to be removed in 6.2
421
- */
422
- @ Deprecated (since = "6.1" , forRemoval = true )
423
- public <T , P extends Publisher <T >> void setBody (P body , ParameterizedTypeReference <T > elementTye ) {
424
- throw new UnsupportedOperationException ();
425
- }
426
-
427
360
/**
428
361
* Build the {@link HttpRequestValues} instance.
429
362
*/
@@ -513,24 +446,6 @@ private String appendQueryParams(
513
446
return uriComponentsBuilder .build ().toUriString ();
514
447
}
515
448
516
- /**
517
- * Create {@link HttpRequestValues} from values passed to the {@link Builder}.
518
- * @deprecated in favour of
519
- * {@link Builder#createRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)}
520
- * to be removed in 6.2.
521
- */
522
- @ Deprecated (since = "6.1" , forRemoval = true )
523
- protected HttpRequestValues createRequestValues (
524
- @ Nullable HttpMethod httpMethod ,
525
- @ Nullable URI uri , @ Nullable String uriTemplate ,
526
- Map <String , String > uriVars ,
527
- HttpHeaders headers , MultiValueMap <String , String > cookies , Map <String , Object > attributes ,
528
- @ Nullable Object bodyValue ) {
529
-
530
- return createRequestValues (httpMethod , uri , null , uriTemplate ,
531
- uriVars , headers , cookies , attributes , bodyValue );
532
- }
533
-
534
449
/**
535
450
* Create {@link HttpRequestValues} from values passed to the {@link Builder}.
536
451
* @since 6.1
0 commit comments