Code example for BasicResponseHandler

0
        JSONObject jso = null;
        boolean ok = false;
        try { 
            mConsumer.sign(get);
            String response = mClient.execute(get, new BasicResponseHandler());
            jso = new JSONObject(response);
            // Log.d(TAG, "authenticatedQuery: " + jso.toString(2)); 
            ok = true;
        } catch (Exception e) {
            e.printStackTrace();
            throw new ConnectionException(e.getLocalizedMessage());
        } 
        if (!ok) {
            jso = null;
        } 
        return jso;
    } 
 
    private JSONObject getUrl(String url) throws ConnectionException {
        HttpGet get = new HttpGet(url);
        return getRequest(get);