Dear All; when using the TIdHTTP and TIdCookieManager components, how do I accept a cookie?
Here's what I'm trying to:
with IdHTTP1->AllowCookies set to true, the Server returns OK and I see in the IdHTTP1->OnHeadersAvailable event handler the line "Set-Cookie: ..." shows 5 times (5 different cookies); the IdCookieManager1->OnNewCookie event also fires 5 times; and IdCookieManager1->CookieCollection->Count == 5 after IdHTTP1->Get() returns.
Looks like Indy components do their job but the server response is a 200Kb HTML doc that basically says "your browser blocks cookies...". I did try to set ACookie argument in the IdCookieManager1->OnNewCookie handler call to true but result is the same.
Please assist; many thanks in advance.
Boba TC.
Here's what I'm trying to:
Code:
TIdHTTP *IdHTTP1;
TIdCookieManager *IdCookieManager1;
//...
Code:
//IdHTTP1->CookieManager = IdCookieManager1; - set @ design
Code:
try{
IdHTTP1->Get(stringServerURL, myMemoryStream);
}catch(...){}
with IdHTTP1->AllowCookies set to true, the Server returns OK and I see in the IdHTTP1->OnHeadersAvailable event handler the line "Set-Cookie: ..." shows 5 times (5 different cookies); the IdCookieManager1->OnNewCookie event also fires 5 times; and IdCookieManager1->CookieCollection->Count == 5 after IdHTTP1->Get() returns.
Looks like Indy components do their job but the server response is a 200Kb HTML doc that basically says "your browser blocks cookies...". I did try to set ACookie argument in the IdCookieManager1->OnNewCookie handler call to true but result is the same.
Please assist; many thanks in advance.
Boba TC.