// Add as the first request interceptor
client.addRequestInterceptor(new PreemptiveAuth(), 0);
}
boolean requestSentRetryEnabled = Boolean.parseBoolean(System.getProperty("requestSentRetryEnabled"));
if(requestSentRetryEnabled){
client.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(3,requestSentRetryEnabled));
}
// set the following user agent with each request
String userAgent = "ArtifactoryBuildClient/" + CLIENT_VERSION;
HttpProtocolParams.setUserAgent(client.getParams(), userAgent);
return client;