use of com.netflix.discovery.shared.transport.jersey2.AbstractJersey2EurekaHttpClient in project eureka by Netflix.
the class AbstractJersey2EurekaHttpClientTest method getEurekaHttpClient.
@Override
protected EurekaHttpClient getEurekaHttpClient(URI serviceURI) {
Jersey2ApplicationClientFactoryBuilder factoryBuilder = Jersey2ApplicationClientFactory.newBuilder();
if (serviceURI.getUserInfo() != null) {
factoryBuilder.withFeature(HttpAuthenticationFeature.basicBuilder().build());
}
TransportClientFactory clientFactory = factoryBuilder.build();
jersey2HttpClient = (AbstractJersey2EurekaHttpClient) clientFactory.newClient(new DefaultEndpoint(serviceURI.toString()));
return jersey2HttpClient;
}
Aggregations