Indy 9
TIdServerCookies
Hierarchy, Properties, Methods, See Also, Unit: IdCookie
Implements a container for Cookie class instances.
TIdServerCookies = class(TIdCookies)
Unit
IdCookie
Description
TIdServerCookies is a TIdCookies decendant that implements a container for server Cookie class instances. TIdServerCookies provides methods that allow creation of both TIdCookieRFC2109 Cookie class instances. TIdServerCookies also provides methods that provide access to Cookie class instances using Cookie name, and an integer position in the server Cookie collection.

TIdServerCookies is the type used by TIdHTTPRequestInfo and TIdHTTPResponseInfo to represent the Cookie collection maintained by a TIdHTTP server.


TIdServerCookies.Cookie
TIdServerCookies, See Also
Provides access to server Cookie collection items by name.
property Cookie [const AName: string]: TIdCookieRFC2109;
Return Value
TIdCookieRFC2109 - Cookie with the specified name, or Nil.
Description
Cookie is a read-only TIdCookieRFC2109 property that provides access to server Cookies in the collection using the name specified in AName. TIdServerCookies calls GetCookieIndex, when using the read access specifier for Cookie, to determine the position of the Cookie having the specified CookieName. Cookie can return Nil when a Cookie cannot be located in the collection having the specified name value.

Use CookieListByDomain to limit access to Cookie collection items having a specified Domain value. Use Items to access Cookie collection items by their integer position in the container.


TIdServerCookies.Add
TIdServerCookies, See Also
Creates a server Cookie class instance to be added to the collection.
function Add: TIdServerCookie;
Return Value
TIdServerCookie - Server Cookie class instance added to the collection.
Description
Add is a TIdServerCookie function that creates a new instance of TIdServerCookie to be added to the Cookie collection. Add creates the Cookie class instance using the TIdServerCookies object instance as the owner of the collection item.

Add is called from TIdHTTPServer when cookies are created to represent the Session used for an HTTP client connection, or when Cookies are received in the request for an executing peer thread.


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