> Can i attach cookie to json rpc object in client side & sent a
> request?
> If yes How?
yes, you can. create an instance of org.apache.http.cookie.Cookie, and
add it to an instance of
org.apache.http.impl.client.BasicCookieStore.BasicCookieStore, then
add that to your BasicHttpContext. then it goes something like this:
AndroidHttpClient client = AndroidHttpClient.newInstance(USER_AGENT);
BasicHttpContext httpContext = new BasicHttpContext();
httpContext.setAttribute(ClientContext.COOKIE_STORE, mCookieStore);
HttpGet request = new HttpGet(url);
HttpResponse httpResponse = client.execute(request, httpContext);
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment