获取request header的值
1Sring mvc 中可以通过注解 :
@RequestHeader ("host") String hostName
2httpservletrequest request
request.getHeader("Host")
//遍历全部
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String key = (String) headerNames.nextElement();
String value = request.getHeader(key);
}