Code example for HttpResponse

Methods: getEntity, getStatusLine

0
    public static class Response { 
        private int statusCode;
        private InputStream responseBody;
 
        public Response(HttpResponse httpResponse) throws IOException {
            statusCode = httpResponse.getStatusLine().getStatusCode();
            responseBody = httpResponse.getEntity().getContent();
        } 
 
        public int getStatusCode() { 
            return statusCode;
        } 
 
        public InputStream getResponseBody() {
            return responseBody;
        } 
    } 
}