|
29 | 29 | import java.util.Collections;
|
30 | 30 | import java.util.List;
|
31 | 31 |
|
32 |
| -import org.apache.hc.client5.http.classic.HttpClient; |
| 32 | +import org.apache.http.client.HttpClient; |
| 33 | +import org.apache.http.client.methods.HttpGet; |
33 | 34 | import org.eclipse.jgit.transport.HttpTransport;
|
34 | 35 | import org.eclipse.jgit.transport.http.HttpConnection;
|
35 | 36 | import org.eclipse.jgit.transport.http.HttpConnectionFactory;
|
|
47 | 48 | import org.springframework.cloud.config.server.proxy.ProxyHostProperties;
|
48 | 49 | import org.springframework.context.annotation.Configuration;
|
49 | 50 | import org.springframework.context.annotation.Import;
|
50 |
| -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
51 | 51 | import org.springframework.test.util.ReflectionTestUtils;
|
52 |
| -import org.springframework.web.client.RestTemplate; |
53 | 52 |
|
54 | 53 | import static org.assertj.core.api.Assertions.assertThat;
|
55 | 54 | import static org.hamcrest.Matchers.allOf;
|
@@ -249,8 +248,11 @@ private String[] gitProperties(String repoUrl, ProxyHostProperties httpProxy, Pr
|
249 | 248 | }
|
250 | 249 |
|
251 | 250 | private void makeRequest(HttpClient httpClient, String url) {
|
252 |
| - RestTemplate restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient)); |
253 |
| - restTemplate.getForObject(url, String.class); |
| 251 | + try { |
| 252 | + httpClient.execute(new HttpGet(url)); |
| 253 | + } catch (IOException e) { |
| 254 | + throw new RuntimeException(e); |
| 255 | + } |
254 | 256 | }
|
255 | 257 |
|
256 | 258 | private HttpClient getHttpClientForUrl(String repoUrl) throws IOException {
|
|
0 commit comments