Code example for HttpResponse

Methods: getAllHeadersgetEntitygetStatusLine

0
        return msg;
    } 
 
    // Interface to AsyncHttpRequest 
    void sendResponseMessage(HttpResponse response) {
        StatusLine status = response.getStatusLine();
        String responseBody = null;
        try { 
            HttpEntity entity = null;
            HttpEntity temp = response.getEntity();
            if(temp != null) {
                entity = new BufferedHttpEntity(temp);
                responseBody = EntityUtils.toString(entity, "UTF-8");
            } 
        } catch(IOException e) {
            sendFailureMessage(e, (String) null);
        } 
 
        if(status.getStatusCode() >= 300) {
            sendFailureMessage(new HttpResponseException(status.getStatusCode(), status.getReasonPhrase()), responseBody);
        } else { 
            sendSuccessMessage(status.getStatusCode(), response.getAllHeaders(), responseBody);
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java