Example usage for org.eclipse.jgit.transport.http HttpConnectionFactory create

List of usage examples for org.eclipse.jgit.transport.http HttpConnectionFactory create

Introduction

In this page you can find the example usage for org.eclipse.jgit.transport.http HttpConnectionFactory create.

Prototype

HttpConnection create(URL url) throws IOException;

Source Link

Document

Creates a new connection to a destination defined by a java.net.URL

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");
}