final HttpUrlConfiguration httpConfig)
throws IOException {
// Create a HTTP Client which will timeout connections and round trips
// in the specified period.
final HttpClientFactory factory = HttpClientFactory.getDefaultInstance();
final HttpClientBuilder builder = factory.createClientBuilder();
builder.setConnectionTimeout(timeout);
builder.setRoundTripTimeout(timeout);
final HttpClient httpClient = builder.buildHttpClient();
final GetMethod method = new GetMethod(url.toExternalForm());
final HostConfiguration configuration = new HostConfiguration();
configuration.setHost(url.getHost(), url.getPort(), url.getProtocol());
method.setHostConfiguration(configuration);