request.setRequestMethod("DELETE");
request.connect();
if (request.getResponseCode() != expected) {
throw new WorldBankException(convertStreamToString(getWrappedInputStream(request.getErrorStream(),
GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()))));
} else {
return getWrappedInputStream(request.getInputStream(),
GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()));
}
} catch (IOException e) {
throw new WorldBankException(e);
}
}