An error is reported when using httpclient to request the response: Going to buffer response body of large or unknown size.Using getResponseBodyAsStre
When the above warning using getResponseBodyAsStream Alternatively getResponseBodyAsString acquiring object information returned, modified as follows:
the
String html = postMethod.getResponseBodyAsString();
Replace with:
BufferedReader reader = new BufferedReader(new InputStreamReader(postMethod.getResponseBodyAsStream()));
StringBuffer stringBuffer = new StringBuffer();
String str = "";
while((str = reader.readLine())!=null){
stringBuffer.append(str);
}
String html=stringBuffer.toString();