@@ -475,6 +475,7 @@ Builder defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate,
475
475
476
476
/**
477
477
* Contract for specifying the URI for a request.
478
+ *
478
479
* @param <S> a self reference to the spec type
479
480
*/
480
481
interface UriSpec <S extends RequestHeadersSpec <?>> {
@@ -518,6 +519,7 @@ interface UriSpec<S extends RequestHeadersSpec<?>> {
518
519
519
520
/**
520
521
* Contract for specifying request headers leading up to the exchange.
522
+ *
521
523
* @param <S> a self reference to the spec type
522
524
*/
523
525
interface RequestHeadersSpec <S extends RequestHeadersSpec <S >> {
@@ -701,6 +703,7 @@ default <T> T exchange(ExchangeFunction<T> exchangeFunction) {
701
703
* @param exchangeFunction the function to handle the response with
702
704
* @param <T> the type the response will be transformed to
703
705
* @return the value returned from the exchange function, never {@code null}
706
+ * @since 6.2.6
704
707
*/
705
708
default <T > T exchangeForRequiredValue (RequiredValueExchangeFunction <T > exchangeFunction ) {
706
709
return exchangeForRequiredValue (exchangeFunction , true );
@@ -763,12 +766,14 @@ default <T> T exchangeForRequiredValue(RequiredValueExchangeFunction<T> exchange
763
766
* {@code exchangeFunction} is invoked, {@code false} to keep it open
764
767
* @param <T> the type the response will be transformed to
765
768
* @return the value returned from the exchange function, never {@code null}
769
+ * @since 6.2.6
766
770
*/
767
771
<T > T exchangeForRequiredValue (RequiredValueExchangeFunction <T > exchangeFunction , boolean close );
768
772
769
773
770
774
/**
771
775
* Defines the contract for {@link #exchange(ExchangeFunction)}.
776
+ *
772
777
* @param <T> the type the response will be transformed to
773
778
*/
774
779
@ FunctionalInterface
@@ -787,6 +792,8 @@ interface ExchangeFunction<T> {
787
792
788
793
/**
789
794
* Variant of {@link ExchangeFunction} returning a non-null required value.
795
+ *
796
+ * @since 6.2.6
790
797
* @param <T> the type the response will be transformed to
791
798
*/
792
799
@ FunctionalInterface
@@ -799,6 +806,7 @@ interface RequiredValueExchangeFunction<T> extends ExchangeFunction<T> {
799
806
* @return the exchanged value, never {@code null}
800
807
* @throws IOException in case of I/O errors
801
808
*/
809
+ @ Override
802
810
T exchange (HttpRequest clientRequest , ConvertibleClientHttpResponse clientResponse ) throws IOException ;
803
811
}
804
812
@@ -824,7 +832,6 @@ interface ConvertibleClientHttpResponse extends ClientHttpResponse {
824
832
*/
825
833
@ Nullable
826
834
<T > T bodyTo (ParameterizedTypeReference <T > bodyType );
827
-
828
835
}
829
836
}
830
837
@@ -1006,6 +1013,7 @@ interface ErrorHandler {
1006
1013
1007
1014
/**
1008
1015
* Contract for specifying request headers and URI for a request.
1016
+ *
1009
1017
* @param <S> a self reference to the spec type
1010
1018
*/
1011
1019
interface RequestHeadersUriSpec <S extends RequestHeadersSpec <S >> extends UriSpec <S >, RequestHeadersSpec <S > {
@@ -1018,5 +1026,4 @@ interface RequestHeadersUriSpec<S extends RequestHeadersSpec<S>> extends UriSpec
1018
1026
interface RequestBodyUriSpec extends RequestBodySpec , RequestHeadersUriSpec <RequestBodySpec > {
1019
1027
}
1020
1028
1021
-
1022
1029
}
0 commit comments