Internet Direct (Indy)
Home
PreviousUpNext
TOnNewCookieEvent Type

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

Pascal
TOnNewCookieEvent = procedure (ASender: TObject; ACookie: TIdCookieRFC2109; Var VAccept: Boolean) of object;
Parameters 
Description 
ASender 
Cookie Manager generatinmg the event notification.
 
ACookie 
Cookie class instance to be added to the collection.
 
VAccept 
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.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.