use of com.loopj.android.http.AsyncHttpClient in project UltimateAndroid by cymcsg.
the class HttpUtilsAsync method postWithCookie.
/**
* Perform a HTTP POST request with cookie which generate by own context
*
* @param context
* @param url
* @param params
* @param responseHandler
*/
public static void postWithCookie(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
AsyncHttpClient client = new AsyncHttpClient();
PersistentCookieStore myCookieStore = new PersistentCookieStore(context);
client.setCookieStore(myCookieStore);
client.post(getAbsoluteUrl(url), params, responseHandler);
}
use of com.loopj.android.http.AsyncHttpClient in project UltimateAndroid by cymcsg.
the class HttpUtilsAsync method getWithCookie.
/**
* Perform a HTTP GET request with cookie which generate by own context
*
* @param context
* @param url
* @param responseHandler
*/
public static void getWithCookie(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
AsyncHttpClient client = new AsyncHttpClient();
PersistentCookieStore myCookieStore = new PersistentCookieStore(context);
client.setCookieStore(myCookieStore);
client.get(getAbsoluteUrl(url), params, responseHandler);
}
use of com.loopj.android.http.AsyncHttpClient in project UltimateAndroid by cymcsg.
the class HttpUtilsAsync method getWithCookie.
/**
* Perform a HTTP GET request with cookie which generate by own context
*
* @param context
* @param url
* @param responseHandler
*/
public static void getWithCookie(Context context, String url, AsyncHttpResponseHandler responseHandler) {
AsyncHttpClient client = new AsyncHttpClient();
PersistentCookieStore myCookieStore = new PersistentCookieStore(context);
// myCookieStore.clear();
client.setCookieStore(myCookieStore);
client.get(getAbsoluteUrl(url), responseHandler);
}
use of com.loopj.android.http.AsyncHttpClient in project UltimateAndroid by cymcsg.
the class HttpUtilsAsync method postWithCookie.
/**
* Perform a HTTP POST request with cookie which generate by own context
*
* @param context
* @param url
* @param responseHandler
*/
public static void postWithCookie(Context context, String url, AsyncHttpResponseHandler responseHandler) {
AsyncHttpClient client = new AsyncHttpClient();
PersistentCookieStore myCookieStore = new PersistentCookieStore(context);
// myCookieStore.clear();
client.setCookieStore(myCookieStore);
client.post(getAbsoluteUrl(url), responseHandler);
}
use of com.loopj.android.http.AsyncHttpClient in project AnimeTaste by daimajia.
the class ApiConnector method get.
private void get(String request, JsonHttpResponseHandler handler) {
AsyncHttpClient client = new AsyncHttpClient();
client.setTimeout(10000);
client.get(request, null, handler);
}
Aggregations