request 获取body内容

    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        BufferedReader br = request.getReader();
        String str = "";
        String listString = "";
        while ((str = br.readLine()) != null) {
            listString += str;
        }
        System.out.println(listString);
    }

猜你喜欢

转载自www.cnblogs.com/ooo0/p/10343017.html