Example usage for org.eclipse.jgit.transport HttpTransport getConnectionFactory

List of usage examples for org.eclipse.jgit.transport HttpTransport getConnectionFactory

Introduction

In this page you can find the example usage for org.eclipse.jgit.transport HttpTransport getConnectionFactory.

Prototype

public static HttpConnectionFactory getConnectionFactory() 

Source Link

Document

Get the org.eclipse.jgit.transport.http.HttpConnectionFactory used to create new connections

Usage

From source file:org.springframework.cloud.config.server.environment.ConfigurableHttpConnectionFactoryIntegrationTests.java

License:Apache License

private HttpClient getHttpClientForUrl(String repoUrl) throws IOException {
    HttpConnectionFactory connectionFactory = HttpTransport.getConnectionFactory();
    URL url = new URL(repoUrl);
    HttpConnection httpConnection = connectionFactory.create(url);
    assertThat(httpConnection).isInstanceOf(HttpClientConnection.class);
    return (HttpClient) ReflectionTestUtils.getField(httpConnection, "client");
}