Topic Path: Symbol Reference > Types > TOnNewCookieEvent Type
TOnNewCookieEvent Type

Event type signalled when a new Cookie is added to the HTTP client Cookie collection.

TOnNewCookieEvent = procedure (ASender: TObject; ACookie: TIdCookieRFC2109; Var VAccept: Boolean) of object;
Cookie Manager generatinmg the event notification.
Cookie class instance to be added to the collection.
Indicates if the Cookie was accepted and added. 

TOnNewCookieEvent is a TOnNewCookieEvent event type signalled when TIdCookieManager adds a new Cookie class instance to the CookieCollection maintained for and by the TIdHTTP client. Applications must assign a procedure to the OnNewCookie event handler to allow a response to the event notification. 

ACookie is the TIdCookieRFC2109 Cookie class instance, or descendant, to be added to the collection. ACookie is created as a result of TIdCookieManager calls to either AddCookie or AddCookie2 during processing of Cookie headers detected in a response from an HTTP server. 

VAccept is a Boolean variable parameter that indicates if the Cookie was accepted and added to the collection maintained by the Cookie manager. The OnNewCookie event handler can set the value of VAccept to False to indicate that a Cookie was not added due to Cookie expiration, invalid Domain or Path attributes, incorrect Secure connection settings, or other invalid Cookie attributes.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.