Code example for HttpResponse

Methods: containsHeadergetStatusLine

0
        super(); 
    } 
 
    public void process(final HttpResponse response, final HttpContext context)
            throws HttpException, IOException { 
        Args.notNull(response, "HTTP response");
        final int status = response.getStatusLine().getStatusCode();
        if ((status >= HttpStatus.SC_OK) &&
            !response.containsHeader(HTTP.DATE_HEADER)) {
            final String httpdate = DATE_GENERATOR.getCurrentDate();
            response.setHeader(HTTP.DATE_HEADER, httpdate);
        } 
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE