HttpClient httpClient = new DefaultHttpClient();
ClientConfig config = new ApacheHttpClientConfig(httpClient);
config.followRedirects(true);
config.handlers(
new LoggingHandler(log, /*debug*/ false),
new BasicAuthSecurityHandler(username, password)
);
this.client = new RestClient(config);
}