String xml = createDataSourceXml(dataSource, fileAndChecksums, filterUrls);
log.info(format("Sending checksums for %s filtered with %s:\n%s", fileAndChecksums, printArrayToDialogString(filterUrls), xml));
Post request = new Post(getDataSourcesUrl(), credentials);
request.addFile("file", xml.getBytes());
String result = request.executeAsString();
if (request.isUnAuthorized())
throw new UnAuthorizedException("Cannot send checksums ", getDataSourcesUrl());
if (!request.isSuccessful())
throw new IOException("POST on " + getDataSourcesUrl() + " for data source " + dataSource +
" not successful: " + result);