3

I'm using asyncHttpClient.get() in a scenario where the response should return a huge amount of data, but the response is incomplete (and unparseable).

Reference link : asyncHttpResponseHandler.onSuccess

Here is my code:

asyncHttpClient.get(relativeUrl, new AsyncHttpResponseHandler() {
        @Override
        public void onSuccess(int statusCode, Header[] headerInfo, byte[] responseData) {
            if (responseData != null) {
                String responseStr = new String(responseData);
                System.out.println("Response",responseStr);
            }
        }
    }

Why is the response incomplete?

John Hascall
  • 9,176
  • 6
  • 48
  • 72
Balu
  • 1,069
  • 2
  • 10
  • 24
  • 1
    what's the status code you are getting in this case? – Rahul Mar 18 '15 at 09:38
  • 1
    maybe you can confirm the response progress with your custom implementation for onProgress method, so that you will get a bit of an idea – Rahul Mar 18 '15 at 09:56
  • 1
    I think your parser is not working, can you post your parser code so that we can have a look in it, and API response also. – Ashish Awasthi Mar 18 '15 at 14:12

0 Answers0