Code example for HttpResponse

Methods: getHeaders

0
 
        return headers;
    } 
 
    private static String getResponseHeaderFirstValue(HttpResponse response, String headerName) {
        Header[] h = response.getHeaders(headerName);
        if (h.length > 0) return h[0].getValue();
        return null; 
    } 
 
    private static long getResponseLastModified(HttpResponse response) {
        String lastModified = getResponseHeaderFirstValue(response, "last-modified");
        if (lastModified != null) {
            SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
            try { 
                return format.parse(lastModified).getTime();
            } catch (ParseException e) {
                return 0; 
            } 
        } 
Connect your IDE to all the code out there  Get Codota for Java