public static String GetInputStreamString(HttpServletRequest request) throws IOException { StringBuffer data = new StringBuffer(); String line = null; BufferedReader reader = request.getReader(); while ((line = reader.readLine()) != null) data.append(line); return data.toString(); }
客户端一定要post请求服务器端才能接收数据。