throw new UnexpectedResponseException(statusCode, new String(content));
}
} catch (OAuthException e) {
throw new InternalConfigurationException("Failed to create OAuth signature", e);
} catch (IOException e) {
throw new ConnectionException("Failed to connect to BellaDati", e);
} finally {
try {
if (response != null) {
response.close();
}
} catch (IOException e) {
throw new ConnectionException("Failed to connect to BellaDati", e);
}
request.releaseConnection();
}
}