Request header information

System.out.println("+++++++++++++++++++++++++++++++++++++++++++") ; String head = request.getHeader("Accept-Encoding"); // Some browsers do not support compressed data if (head.contains("gzip")) { // Output compressed data } else { // Output uncompressed data } // Get all the values ​​of the header with the specified name Enumeration e = request.getHeaders("Accept-Encoding"); while (e.hasMoreElements()) { String value = (String) e.nextElement(); System.out. println(value); } System.out.println("------------------------"); // Get all headers and values ​​e = request.getHeaderNames(); while
















(e.hasMoreElements()) {Stringname = (String) e.nextElement();Stringvalue = request.getHeader(name);System.out.println(name+ "=" + value);}System.out.println("+++++++++++++++++++++++++++++++++++++++++");




Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326613934&siteId=291194637