I am using httpGet
. But I am getting an incomplete response. Just for testing I used another URL and for that my code works fine, but for my actual link my response is truncated. I have referred the this solution, but it didn't work for me. Please suggest me how to solve this.
Here is what I have done:
private HttpGet httpGet;
private HttpClient client;
private String url;
httpGet = new HttpGet(url);
try{
BasicResponseHandler responseHandler = new BasicResponseHandler();
data = client.execute(httpGet, responseHandler);
Log.i(LOG_TAG, "Response :: " + data);
returnClass = getMapper().readValue(data, responseType);
Log.i(LOG_TAG, "URL :: " + url + " Completed");
}finally{
client.getConnectionManager().shutdown();
}