public JenkinsHttpClient(URI uri){
  this.context=uri.getPath();
  if (!context.endsWith("/")) {
    context+="/";
  }
  this.uri=uri;
  this.mapper=getDefaultMapper();
  HttpParams httpParameters=new BasicHttpParams();
  HttpConnectionParams.setConnectionTimeout(httpParameters,10000);
  HttpConnectionParams.setSoTimeout(httpParameters,10000);
  this.client=new DefaultHttpClient(new PoolingClientConnectionManager(),httpParameters);
}

public JenkinsHttpClient ( URI uri ) { this . context = uri . getPath ( ) ; if ( ! context . endsWith ( "/" ) ) { context += "/" ; } this . uri = uri ; this . mapper = getDefaultMapper ( ) ; HttpParams httpParameters = new BasicHttpParams ( ) ; HttpConnectionParams . setConnectionTimeout ( httpParameters , 10000 ) ; HttpConnectionParams . setSoTimeout ( httpParameters , 10000 ) ; this . client = new DefaultHttpClient ( new PoolingClientConnectionManager ( ) , httpParameters ) ; }
create an unauthenticated jenkins http client
