Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages
Started by Nicolae Fieraru
Fri, 20 Aug 2004 16:17
Cookies->Delete?
Author: Nicolae Fieraru
Date: Fri, 20 Aug 2004 16:17
Date: Fri, 20 Aug 2004 16:17
13 lines
1159 bytes
1159 bytes
Hi All,
I am using TIdHTTP and TIdCookieManager.
How can I use the function Delete to delete a cookie from TIdCookieManager?
I preffer to do something like
Delete("cookiename")
I know I can add cookies like this:
IdHTTP1->CookieManager->AddCookie("cookiename=cookievalue",".domain.com");
Regards,
Nicolae
Re: Cookies->Delete?
Author: Remy Lebeau (TeamB)
Date: Fri, 20 Aug 2004 18:41
Date: Fri, 20 Aug 2004 18:41
14 lines
1375 bytes
1375 bytes
"Nicolae Fieraru" <nospam@please.com> wrote in message news:41262407@newsgroups.borland.com... > How can I use the function Delete to delete a > cookie from TIdCookieManager? TIdCookieManager does not have any methods for removing cookies by name. You will have to loop through the stored cookies yourself looking for the cookie that you want to remove. TIdCookieManager has a CookieCollection property, which then has GetCookieIndex() and Delete() methods. Gambit
Re: Cookies->Delete?
Author: Nicolae Fieraru
Date: Sun, 22 Aug 2004 05:26
Date: Sun, 22 Aug 2004 05:26
12 lines
1184 bytes
1184 bytes
Hi Remy,
Thank you, that did the trick
int nCookieIndex;
nCookieIndex = IdHTTP1->CookieManager->CookieCollection->GetCookieIndex(0,
"cookie_name");
if(nCookieIndex > 0)
IdHTTP1->CookieManager->CookieCollection->Delete(nCookieIndex);
Regards,
Nicolae
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads