I am sending data to a server using below code:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(URL);
try {
HttpResponse response = httpclient.execute(httppost);
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
} catch (IOException e) {
// TODO Auto-generated catch block
}
}
Server is sending me JSON in response, how can I collect the data sent back to me.
Thanks
Thanks
This might be useful.
HttpClientFactory:
Now, to call it you simply use:
Now you have a thread-safe, fairly easy to use set of classes you can use to call your services and extract your JSON data.