The most easy-to-use Android HTTP library

Source: Internet
Author: User

 

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.