1

我正在使用以下代碼片段在Android中執行HTTP請求。一切似乎都很好,但似乎在某些時候響應會被截斷,而我無法閱讀請求的url的全部內容。AndroidHTTPResponse返回剪輯內容

對響應有任何大小限制嗎?

HttpClient httpclient = new DefaultHttpClient(); 
HttpGet request = new HttpGet(someUrl); 
HttpResponse response = httpclient.execute(request); 
StatusLine statusLine = response.getStatusLine(); 
if(statusLine.getStatusCode() == HttpStatus.SC_OK){ 
    ByteArrayOutputStream out = new ByteArrayOutputStream(); 
    response.getEntity().writeTo(out); 
    out.close(); 
    String responseString = out.toString(); 
    Log.w("Response", responseString); // The response is clipped at some point 
} 

謝謝。

回答