What is the most efficient method to get a JSON response when using http get/post. Obviously they must be done asynchronously.
Note: I already have internet permissions enabled in the manifest file.
Posting:
HttpPost httpPost = new HttpPost("MYDOMAIN");
HttpResponse response = httpClient.execute(httpPost);
Getting:
HttpGet httpGet = new HttpGet("MYDOMAIN");
HttpResponse response = httpClient.execute(httpGet);
HTTP Requests have to be done Asynchronously. First make sure you have INTERNET Permission in your AndroidManifest.xml
Then make a class for Request so you can reuse it
Then make a class called callback and make an interface like so:
Then either use POST or GET. Server should return JSON and then you can parse it as you wish