String response = null;
int code;
try {
code = httpClient.executeMethod(post);
if (code != HttpURLConnection.HTTP_OK) {
throw new HttpException("HTTP Response Code: " + code);
}
response = post.getResponseBodyAsString();
} finally {
post.releaseConnection();
}