APISonar


io.netty.handler.codec.http.HttpHeaders.Names.DATE

> io > netty > handler > codec > http > HttpHeaders > Names > DATE
io APIs netty APIs handler APIs codec APIs http APIs HttpHeaders APIs Names APIs DATE APIs

Example 1
private static void setDateHeader(HttpResponse response) {
        SimpleDateFormat dateFormatter = new SimpleDateFormat(HTTP_DATE_FORMAT, Locale.US);
        dateFormatter.setTimeZone(TimeZone.getTimeZone(HTTP_DATE_GMT_TIMEZONE));

        Calendar time = new GregorianCalendar();
        response.setHeader(HttpHeaders.Names.DATE, dateFormatter.format(time.getTime()));
    }