Cookies for url before sending

Giganews Newsgroups
Subject: Cookies for url before sending
Posted by:  Hans Peter (hanspet…@hotmail.com)
Date: Wed, 8 Mar 2006

hallo,

i want to read the cookies that will send for a specified url
before i'll send the get/post request

i tried something like this:
-----------------------------------------------------------------------------------------------
        for i:= 0 to IdCookieManager.CookieCollection.Count-1 do
          if SmartPos('sub.domain.tld',
IdCookieManager.CookieCollection.Items[i].Domain, True, 1, True) = 1 then
            stringlist.add(IdCookieManager.CookieCollection.Items[i].CookieText);

        idhttp.get('sub.domain.tld');
-----------------------------------------------------------------------------------------------
(SmartPos() is just a faster Pos() methode)

the cookie list l get in this way is much larger then the cookies that will
send,
so how to get the current valid cookies for an given url?

regards

Replies