@@ -0,0 +1,1705 @@
+/**   %0A * @Title: AsyncHttpUtil.java%0A * @Package me.pc.mobile.helper.http%0A * @Description: TODO%0A * @author SilentKnight %7C%7C happychinapc@gmail.com%0A * @date 2014 2014-11-19 %E4%B8%8B%E5%8D%884:50:14%0A * @version V1.0.0 %0A */%0Apackage me.pc.mobile.helper.v14.http;%0A%0Aimport android.content.Context;%0A%0Aimport com.loopj.android.http.AsyncHttpClient;%0Aimport com.loopj.android.http.AsyncHttpResponseHandler;%0Aimport com.loopj.android.http.PersistentCookieStore;%0Aimport com.loopj.android.http.RequestHandle;%0Aimport com.loopj.android.http.RequestParams;%0A%0A/**%0A * @author SilentKnight%0A * %0A */%0Apublic class AsyncHttpUtil %7B%0A%0A%09private static final AsyncHttpClient mClient = new AsyncHttpClient();%0A%09private static PersistentCookieStore mCookie;%0A%0A%09private AsyncHttpUtil() %7B%0A%09%7D%0A%0A%09public static void addCookie(Context context) %7B%0A%09%09mCookie = new PersistentCookieStore(context);%0A%09%09mClient.setCookieStore(mCookie);%0A%09%7D%0A%0A%09public static void setSessionId(String sessionId) %7B%0A%09%09addHeader(%22Cookie%22, %22JSESSIONID=%22 + sessionId);%0A%09%7D%0A%0A%09public static void addHeader(String header, String value) %7B%0A%09%09mClient.addHeader(header, value);%0A%09%7D%0A%0A%09public static RequestHandle get(String url,%0A%09%09%09AsyncHttpResponseHandler responseHandler) %7B%0A%09%09return get(url, null, responseHandler);%0A%09%7D%0A%0A%09public static RequestHandle get(String url, RequestParams params,%0A%09%09%09AsyncHttpResponseHandler responseHandler) %7B%0A%09%09return mClient.get(url, params, responseHandler);%0A%09%7D%0A%0A%09public static RequestHandle post(String url,%0A%09%09%09AsyncHttpResponseHandler responseHandler) %7B%0A%09%09return post(url, null, responseHandler);%0A%09%7D%0A%0A%09public static RequestHandle post(String url, RequestParams params,%0A%09%09%09AsyncHttpResponseHandler responseHandler) %7B%0A%09%09return mClient.post(url, params, responseHandler);%0A%09%7D%0A%7D%0A

Create AsyncHttpUtil.java