开发者

How to get cookie information in blackberry HttpConnection

I'm sending request to the server and I'm getting the html response. But I want to store the cookie information. Is there any other classes or methods available to get the cookie information in blackberry.

for (int j = 0; j < 20; j++) {
  String key = httpConn.getHeaderFieldKey(j);
  String field = httpConn.getHeaderField(j);
  if (key == null && j > 0) {
    break;
  }
  add(new RichTextField(key + " : " + field));
}

I used this code to get the header information, but I didnt get-setcookie header ( which I'm supposed to get). the output is as follows.

Connection: Close
e开发者_StackOverflow社区xpires: -1
date: Tue, 08 Mar 2011..........
server: Microsoft-IIS/7.5
x-powered-by: ASP.NET
pragma:no-cache
x-rim-etag:4626353C5B58791ACD00D30EAADEAF4663FE219F
cache-control: no-cache, no-store
x-aspnet-version:2.0.50727
content-location:http://beemediahive...........
content-type: text/html; charset=utf-8

How do I get cookie information in blackberry?


check out below link: http://esgroupmobile.wordpress.com/2009/05/29/blackberry-development-tip-http-get/

Hope it helps you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜