|
|
@ -138,8 +138,8 @@ public class TestRestTemplate {
|
|
|
|
HttpClientOption... httpClientOptions) {
|
|
|
|
HttpClientOption... httpClientOptions) {
|
|
|
|
Assert.notNull(restTemplate, "RestTemplate must not be null");
|
|
|
|
Assert.notNull(restTemplate, "RestTemplate must not be null");
|
|
|
|
this.httpClientOptions = httpClientOptions;
|
|
|
|
this.httpClientOptions = httpClientOptions;
|
|
|
|
if (getRequestFactoryClass(restTemplate).getName().equals(
|
|
|
|
if (getRequestFactoryClass(restTemplate).isAssignableFrom(
|
|
|
|
"org.springframework.http.client.HttpComponentsClientHttpRequestFactory")) {
|
|
|
|
HttpComponentsClientHttpRequestFactory.class)) {
|
|
|
|
restTemplate.setRequestFactory(
|
|
|
|
restTemplate.setRequestFactory(
|
|
|
|
new CustomHttpComponentsClientHttpRequestFactory(httpClientOptions));
|
|
|
|
new CustomHttpComponentsClientHttpRequestFactory(httpClientOptions));
|
|
|
|
}
|
|
|
|
}
|
|
|
|