Code example for HttpEntity

Methods: getContent

0
        OutpointsResponse outpointsResponse = null;
        try { 
            request = new HttpGet(BITCOIN_EXIT_NODE_URL + "?addresses=" + btcAddress);
            response = client.execute(request);
            HttpEntity responseEntity = response.getEntity();
            InputStream content = responseEntity.getContent();
            Reader reader = new InputStreamReader(content);
            outpointsResponse = gson.fromJson(reader, OutpointsResponse.class);
            wallet.add(outpointsResponse);
            Log.i(getClass().getSimpleName()+"", outpointsResponse+"");
        } catch (Exception e) {
            Log.w(getClass().getSimpleName()+"", e);
            outpointsResponse = new OutpointsResponse(e, null);
        } 
//        context.startActivity(new Intent(context, Bitcoin.class)); 
    } 
} 
Experience pair programming with AI  Get Codota for Java