Http://loopj.com/android-async-http/
The security method is very simple, as long as the latest. jar file is downloaded, put it in the libs/resource library of the project, and then import it.
com.loopj.android.http.*;
That's all. It's very simple!
What should I do with HTTP requests?
?
| 1234567891011121314151617181920212223242526 |
RequestParamsparams=new RequestParams();params.put("username","apptask");params.put("password","123456"); AsyncHttpClient client =new AsyncHttpClient();client.get("http://abc.com/",params,new AsyncHttpResponseHandler(){ @Override public void onStart(){ // Initiated the request } @Override public void onSuccess(String response){ // Successfully got a response } @Override public void onFailure(Throwable e,String response){ // Response failed :( } @Override public void onFinish(){ // Completed the request (either success or failure) } }); |
It looks like jQuery. Why do I say it is like ASIHTTPRequest? Because its documentation and examples are both placed in the same region, it is the same as ASIHTTPRequest! If you want to know how to use zookeeper, go to the official website.