1

I am making a GET call and am able to add all the results into an array after parsing the JSON. I want to use that array onpostexecute call. Can I do that with this library?

j_vega19
  • 228
  • 1
  • 2
  • 11

1 Answers1

0

I do it in this way , hope it will help you.

in bussiness layer

HttpUtils.getJson(url, null, new JsonHttpResponseHandler() {
 @Override
 public void onSuccess(int statusCode, Header[] headers, JSONObject      response) {
}
});

in HttpUtils.java

private static AsyncHttpClient client = new AsyncHttpClient();
public static void get(String urlString, RequestParams params, AsyncHttpResponseHandler res)   //url里面带参数
{
    client.get(urlString, params, res);
}
Ninja
  • 2,479
  • 3
  • 23
  • 32