try {
HttpClientRequest cr = new HttpClientRequest();
cr.setUrl(connectionString);
ByteArrayHandler sh = new ByteArrayHandler();
StringProvider cprov = new StringProvider(initString,"text/plain");
cr.setContentHandler(sh);
cr.setContentProvider(cprov);
CredentialProvider cp = getUserName().length()>0 && getUserPassword().length()>0?
new CredentialProvider(getUserName(),getUserPassword()):
CredentialProvider.getThreadLocalInstance();
cr.setCredentialProvider(cp);
cr.execute();
return new ByteArrayInputStream(sh.getContent());
} catch (MalformedURLException ex) {
throw new HRInvalidUrlException("Invalid URL: " + getHostUrl(), ex);
} catch (SocketTimeoutException ex) {
throw new HRTimeoutException(