标签:blog builder stringbu data div span static 读取 throw
java读取请求中body数据
/** * 获取request中body数据 * * @author lifq * * 2017年2月24日 下午2:29:06 * @throws IOException */ public static String getRequestBodyData(HttpServletRequest request) throws IOException{ BufferedReader bufferReader = new BufferedReader(request.getReader()); StringBuilder sb = new StringBuilder(); String line = null; while ((line = bufferReader.readLine()) != null) { sb.append(line); } return sb.toString(); }
标签:blog builder stringbu data div span static 读取 throw
原文地址:http://www.cnblogs.com/haha12/p/6693777.html