RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWebResponse.SetCookieField Method

Adds a cookie header to the response message.

Pascal
procedure SetCookieField(Values: TStrings; const ADomain: AnsiString; const APath: AnsiString; AExpires: TDateTime; ASecure: Boolean);
C++
__fastcall SetCookieField(TStrings Values, const AnsiString ADomain, const AnsiString APath, TDateTime AExpires, Boolean ASecure);

Call SetCookieField to add a cookie header to the Cookies property. Each cookie header contains a set of name/value pairs that can be passed on by the client application. Use the Values parameter to specify the name/value pairs as strings of the form Name=Value. Use the ADomain and APath parameters to indicate which URLs the cookie should be sent to. Use the AExpires parameter to indicate when the cookie is no longer valid. Use the ASecure property to indicate whether the cookie should only be passed on by the client if a secure connection is used. 

See the documentation on the Netscape Web site for more information about cookies. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!