private HttpURLConnection requestReservation(){
  try {
    connection=HttpTransportManager.openConnection(url,basicAuthUsername,basicAuthPassword);
    connection.setUseCaches(false);
    connection.setConnectTimeout(httpTimeout);
    connection.setReadTimeout(httpTimeout);
    connection.setRequestMethod("HEAD");
    analyzeResponseCode(connection.getResponseCode());
  }
 catch (  IOException ex) {
    throw new IoException(ex);
  }
  return connection;
}

private HttpURLConnection requestReservation ( ) { try { connection = HttpTransportManager . openConnection ( url , basicAuthUsername , basicAuthPassword ) ; connection . setUseCaches ( false ) ; connection . setConnectTimeout ( httpTimeout ) ; connection . setReadTimeout ( httpTimeout ) ; connection . setRequestMethod ( "HEAD" ) ; analyzeResponseCode ( connection . getResponseCode ( ) ) ; } catch ( IOException ex ) { throw new IoException ( ex ) ; } return connection ; }
before streaming data to the remote node , make sure it is ok to . we have found that we can be more efficient on a push by relying on http keep - alive .
