throw resp.getStatus().getThrowable();
}
try {
JsonRepresentation repr = new JsonRepresentation(resp.getEntity());
JSONObject o = repr.toJsonObject();
System.out.println("Server version: " + o.optString("server_version"));
System.out.println("ReST API version: " + o.optInt("api_version"));
}
catch (JSONException err) {
throw new Exception ("Cannot Decode JSON", err);