//获取header
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String key = (String) headerNames.nextElement();
String value = request.getHeader(key);
System.out.println("=======车机返回Map:"+value+"========");
map.put(key, value);
}
//获取body
BufferedReader br = request.getReader();
String str2, wholeStr = "";
while((str2 = br.readLine()) != null){
wholeStr += str2;
}
System.out.println(wholeStr);
原文地址:https://www.cnblogs.com/cuijinlong/p/8872002.html
时间: 2024-11-13 06:57:09