Friday, April 19, 2013

HttpClient setCookies from Webview in android

this is real

I seached a bunch of time but there are nothing to work

this is a solution

if you are interested in Huybrid Webview

doing this


URI uri = new URI("http://www.xxx.xxxx/files/test.jsp");

HttpClient httpclient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(uri);

String cookies = CookieManager.getInstance().getCookie(
"http://203.233.82.229/files/test.jsp");
Log.i("cookie", "cookie " + cookies);

httpPost.setHeader("Cookie", cookies);
HttpResponse response = httpclient.execute(httpPost);

No comments:

Post a Comment