use of com.loopj.android.http.PersistentCookieStore 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.PersistentCookieStore 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.PersistentCookieStore 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.PersistentCookieStore 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.PersistentCookieStore in project android-async-http by loopj.
the class PersistentCookiesSample method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// Use the application's context so that memory leakage doesn't occur.
cookieStore = new PersistentCookieStore(getApplicationContext());
// Set the new cookie store.
getAsyncHttpClient().setCookieStore(cookieStore);
super.onCreate(savedInstanceState);
}
Aggregations