HttpServletRequest获取header参数 sign
HttpServletRequest获取header参数 sign
//从请求头中获取参数 private static Map<String, String> getHeaders(HttpServletRequest request) { Map<String, String> headerMap = new HashMap<>(); Enumeration<String> enumeration = request.getHeaderNames(); while (enumeration.hasMoreElements()) { String name = enumeration.nextElement(); String value = request.getHeader(name); headerMap.put(name, value); } return headerMap; } //获取请求头中的签名 String signStr = headers.get("byte-signature");