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);
    }

request 获取body内容_第1张图片

 

转载于:https://www.cnblogs.com/ooo0/p/10343017.html

你可能感兴趣的:(request 获取body内容)