idhtp1.CookieManager := TIdCookieManager.Create(nil);
1、idhtp1.CookieManager.AddCookie('baidu=sb','baidu.com');
2、idhtp1.Get('http://www.baidu.com');
3、for I := 0 to idhtp1.CookieManager.CookieCollection.Count - 1 do
4、s := s + idhtp1.CookieManager.CookieCollection.Items[i].CookieText;
5、ShowMessage(s);