解决WARN警告:Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended
使用Apache HttpClient发送请求,有大量WARN警告:Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended
//returnBody = method.getResponseBodyAsString(); InputStream inputStream = method.getResponseBodyAsStream(); BufferedReader br = new BufferedReader(new InputStreamReader(inputStream)); StringBuffer stringBuffer = new StringBuffer(); String str = ""; while ((str = br.readLine()) != null) { stringBuffer.append(str); } returnBody=stringBuffer.toString();
优秀不够,你是否无可替代
软件测试交流QQ群:721256703,期待你的加入!!
欢迎关注我的微信公众号:软件测试君
![](https://www.cnblogs.com/images/cnblogs_com/longronglang/1061549/o_QQ%E6%88%AA%E5%9B%BE20190728134401.jpg)