Internet Direct (Indy) Version 9.0.1 Beta
TIdCookieManager.OnNewCookie
Event handler signalled when Cookies are added to the collection.

property OnNewCookie: TOnNewCookieEvent;
Description
OnNewCookie is a TOnNewCookieEvent property that represents the event handler signalled when Cookie class instances are added to the CookieCollection. OnNewCookie is signalled when AddCookie or AddCookie2 is used to create the corresponding Cookie class instance used to represent the text for the Cookie.

Applications must assign a procedure to the event handler to allow responding to the event notification. OnNewCookie can indicate if the Cookie is accepted or rejected based on values detected in the Cookie content.

Use OnNewCookie to ovreride the default logic used in management of the CookieCollection when Cookies are added to the collection.