Web.HTTPApp.TWebResponse.SetCookieField

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetCookieField(Values: TStrings; const ADomain, APath: string;
AExpires: TDateTime; ASecure: Boolean; AHttpOnly: Boolean = False;
const ASameSite: string = '');

C++

void __fastcall SetCookieField(System::Classes::TStrings* Values, const System::UnicodeString ADomain, const System::UnicodeString APath, System::TDateTime AExpires, bool ASecure, bool AHttpOnly = false, const System::UnicodeString ASameSite = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
procedure
function
public
Web.HTTPApp.pas
Web.HTTPApp.hpp
Web.HTTPApp TWebResponse

Description

Adds a cookie header to the response message.

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.

See Also