@@ -601,23 +601,23 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
601
601
* Set the list of acceptable {@linkplain MediaType media types}, as
602
602
* specified by the {@code Accept} header.
603
603
* @param acceptableMediaTypes the acceptable media types
604
- * @return the same instance
604
+ * @return this spec for further declaration of the request
605
605
*/
606
606
S accept (MediaType ... acceptableMediaTypes );
607
607
608
608
/**
609
609
* Set the list of acceptable {@linkplain Charset charsets}, as specified
610
610
* by the {@code Accept-Charset} header.
611
611
* @param acceptableCharsets the acceptable charsets
612
- * @return the same instance
612
+ * @return this spec for further declaration of the request
613
613
*/
614
614
S acceptCharset (Charset ... acceptableCharsets );
615
615
616
616
/**
617
617
* Add a cookie with the given name and value.
618
618
* @param name the cookie name
619
619
* @param value the cookie value
620
- * @return the same instance
620
+ * @return this spec for further declaration of the request
621
621
*/
622
622
S cookie (String name , String value );
623
623
@@ -628,7 +628,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
628
628
* {@linkplain MultiValueMap#remove(Object) remove} values, or use any of the other
629
629
* {@link MultiValueMap} methods.
630
630
* @param cookiesConsumer a function that consumes the cookies map
631
- * @return this builder
631
+ * @return this spec for further declaration of the request
632
632
*/
633
633
S cookies (Consumer <MultiValueMap <String , String >> cookiesConsumer );
634
634
@@ -637,22 +637,22 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
637
637
* <p>The date should be specified as the number of milliseconds since
638
638
* January 1, 1970 GMT.
639
639
* @param ifModifiedSince the new value of the header
640
- * @return the same instance
640
+ * @return this spec for further declaration of the request
641
641
*/
642
642
S ifModifiedSince (ZonedDateTime ifModifiedSince );
643
643
644
644
/**
645
645
* Set the values of the {@code If-None-Match} header.
646
646
* @param ifNoneMatches the new value of the header
647
- * @return the same instance
647
+ * @return this spec for further declaration of the request
648
648
*/
649
649
S ifNoneMatch (String ... ifNoneMatches );
650
650
651
651
/**
652
652
* Add the given, single header value under the given name.
653
653
* @param headerName the header name
654
654
* @param headerValues the header value(s)
655
- * @return the same instance
655
+ * @return this spec for further declaration of the request
656
656
*/
657
657
S header (String headerName , String ... headerValues );
658
658
@@ -663,7 +663,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
663
663
* {@linkplain HttpHeaders#remove(String) remove} values, or use any of the other
664
664
* {@link HttpHeaders} methods.
665
665
* @param headersConsumer a function that consumes the {@code HttpHeaders}
666
- * @return this builder
666
+ * @return this spec for further declaration of the request
667
667
*/
668
668
S headers (Consumer <HttpHeaders > headersConsumer );
669
669
@@ -674,6 +674,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
674
674
* @param version the API version of the request; this can be a String or
675
675
* some Object that can be formatted by the inserter — for example,
676
676
* through an {@link ApiVersionFormatter}
677
+ * @return this spec for further declaration of the request
677
678
* @since 7.0
678
679
*/
679
680
S apiVersion (Object version );
@@ -682,7 +683,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
682
683
* Set the attribute with the given name to the given value.
683
684
* @param name the name of the attribute to add
684
685
* @param value the value of the attribute to add
685
- * @return this builder
686
+ * @return this spec for further declaration of the request
686
687
*/
687
688
S attribute (String name , Object value );
688
689
@@ -691,28 +692,28 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
691
692
* the consumer are "live", so that the consumer can be used to inspect attributes,
692
693
* remove attributes, or use any of the other map-provided methods.
693
694
* @param attributesConsumer a function that consumes the attributes
694
- * @return this builder
695
+ * @return this spec for further declaration of the request
695
696
*/
696
697
S attributes (Consumer <Map <String , Object >> attributesConsumer );
697
698
698
699
/**
699
700
* Perform the exchange without a request body.
700
- * @return spec for decoding the response
701
+ * @return a spec for decoding the response
701
702
*/
702
703
ResponseSpec exchange ();
703
704
}
704
705
705
706
706
707
/**
707
- * Specification for providing body of a request.
708
+ * Specification for providing the body of a request.
708
709
*/
709
710
interface RequestBodySpec extends RequestHeadersSpec <RequestBodySpec > {
710
711
711
712
/**
712
713
* Set the length of the body in bytes, as specified by the
713
714
* {@code Content-Length} header.
714
715
* @param contentLength the content length
715
- * @return the same instance
716
+ * @return this spec for further declaration of the request
716
717
* @see HttpHeaders#setContentLength(long)
717
718
*/
718
719
RequestBodySpec contentLength (long contentLength );
@@ -721,7 +722,7 @@ interface RequestBodySpec extends RequestHeadersSpec<RequestBodySpec> {
721
722
* Set the {@linkplain MediaType media type} of the body, as specified
722
723
* by the {@code Content-Type} header.
723
724
* @param contentType the content type
724
- * @return the same instance
725
+ * @return this spec for further declaration of the request
725
726
* @see HttpHeaders#setContentType(MediaType)
726
727
*/
727
728
RequestBodySpec contentType (MediaType contentType );
@@ -731,7 +732,7 @@ interface RequestBodySpec extends RequestHeadersSpec<RequestBodySpec> {
731
732
* {@link WebClient.RequestBodySpec#bodyValue(Object)
732
733
* bodyValue} method on the underlying {@code WebClient}.
733
734
* @param body the value to write to the request body
734
- * @return spec for further declaration of the request
735
+ * @return this spec for further declaration of the request
735
736
* @since 5.2
736
737
*/
737
738
RequestHeadersSpec <?> bodyValue (Object body );
@@ -744,7 +745,7 @@ interface RequestBodySpec extends RequestHeadersSpec<RequestBodySpec> {
744
745
* @param elementClass the class of elements contained in the publisher
745
746
* @param <T> the type of the elements contained in the publisher
746
747
* @param <S> the type of the {@code Publisher}
747
- * @return spec for further declaration of the request
748
+ * @return this spec for further declaration of the request
748
749
*/
749
750
<T , S extends Publisher <T >> RequestHeadersSpec <?> body (S publisher , Class <T > elementClass );
750
751
@@ -755,7 +756,7 @@ interface RequestBodySpec extends RequestHeadersSpec<RequestBodySpec> {
755
756
* @param elementTypeRef the type reference of elements contained in the publisher
756
757
* @param <T> the type of the elements contained in the publisher
757
758
* @param <S> the type of the {@code Publisher}
758
- * @return spec for further declaration of the request
759
+ * @return this spec for further declaration of the request
759
760
* @since 5.2
760
761
*/
761
762
<T , S extends Publisher <T >> RequestHeadersSpec <?> body (
@@ -769,7 +770,7 @@ <T, S extends Publisher<T>> RequestHeadersSpec<?> body(
769
770
* {@link Publisher} or another producer adaptable to a
770
771
* {@code Publisher} via {@link ReactiveAdapterRegistry}
771
772
* @param elementClass the class of elements contained in the producer
772
- * @return spec for further declaration of the request
773
+ * @return this spec for further declaration of the request
773
774
* @since 5.2
774
775
*/
775
776
RequestHeadersSpec <?> body (Object producer , Class <?> elementClass );
@@ -782,18 +783,18 @@ <T, S extends Publisher<T>> RequestHeadersSpec<?> body(
782
783
* {@link Publisher} or another producer adaptable to a
783
784
* {@code Publisher} via {@link ReactiveAdapterRegistry}
784
785
* @param elementTypeRef the type reference of elements contained in the producer
785
- * @return spec for further declaration of the request
786
+ * @return this spec for further declaration of the request
786
787
* @since 5.2
787
788
*/
788
789
RequestHeadersSpec <?> body (Object producer , ParameterizedTypeReference <?> elementTypeRef );
789
790
790
791
/**
791
792
* Set the body of the request to the given {@code BodyInserter}.
792
- * This method invokes the
793
+ * <p> This method invokes the
793
794
* {@link WebClient.RequestBodySpec#body(BodyInserter)
794
795
* body(BodyInserter)} method on the underlying {@code WebClient}.
795
796
* @param inserter the body inserter to use
796
- * @return spec for further declaration of the request
797
+ * @return this spec for further declaration of the request
797
798
* @see org.springframework.web.reactive.function.BodyInserters
798
799
*/
799
800
RequestHeadersSpec <?> body (BodyInserter <?, ? super ClientHttpRequest > inserter );
0 commit comments