Code example for BasicResponseHandler

0
        boolean result = true;
 
        try { 
            HttpClient client = new DefaultHttpClient();
            HttpGet request = new HttpGet(HASH_REQUEST_URL + message_hash + ".json");
            String response = client.execute(request, new BasicResponseHandler());
            JSONObject object = new JSONObject(response);
            result = object.getBoolean("result");
        } catch (JSONException e) {
            log.debug("JSON Error: " + e);
        } catch (IOException e) {
            log.debug("IOException: " + e);
        } 
        return result;
 
    } 
 
    private void waitService() { 
        try { 
            log.debug("Service thread sleeping for " + getScanFrequency() + " seconds...");
            this.sleep(getScanFrequency() * 1000);