Skip to content

Commit 39bb751

Browse files
committed
Polishing
1 parent be5542a commit 39bb751

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestFactory.java

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public BufferingClientHttpRequestFactory(ClientHttpRequestFactory requestFactory
5454
/**
5555
* Constructor variant with an additional predicate to decide whether to
5656
* buffer the response.
57+
* @since 7.0
5758
*/
5859
public BufferingClientHttpRequestFactory(
5960
ClientHttpRequestFactory requestFactory,

spring-web/src/main/java/org/springframework/web/client/RestClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ Builder defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate,
386386
Builder requestInterceptors(Consumer<List<ClientHttpRequestInterceptor>> interceptorsConsumer);
387387

388388
/**
389-
* Enable buffering of request and response content making it possible to
390-
* read the request and the response body multiple times.
389+
* Enable buffering of request and response, aggregating all content before
390+
* it is sent, and making it possible to read the response body repeatedly.
391391
* @param predicate to determine whether to buffer for the given request
392392
* @return this builder
393393
* @since 7.0

spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -834,9 +834,8 @@ void requestInterceptorWithResponseBuffering(ClientHttpRequestFactory requestFac
834834
.retrieve()
835835
.body(String.class);
836836

837-
assertThat(result).isEqualTo("Hello Spring!");
838-
839837
expectRequestCount(1);
838+
assertThat(result).isEqualTo("Hello Spring!");
840839
}
841840

842841
@ParameterizedRestClientTest
@@ -860,9 +859,8 @@ void bufferContent(ClientHttpRequestFactory requestFactory) {
860859
return new String(bytes, UTF_8);
861860
});
862861

863-
assertThat(result).isEqualTo("Hello Spring!");
864-
865862
expectRequestCount(1);
863+
assertThat(result).isEqualTo("Hello Spring!");
866864
}
867865

868866
@ParameterizedRestClientTest

0 commit comments

Comments
 (0)