Indy 9
TOnNewCookieEvent
See Also, Unit: IdCookieManager
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;
Unit
IdCookieManager
Parameters
ACookie
Cookie class instance to be added to the collection.
ASender
Cookie Manager generatinmg the event notification.
VAccept
Indicates if the Cookie was accepted and added.
Description
TOnNewCookieEvent is an 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.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.