Unit 'HTTPDefs' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TCookie

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

HTTP cookie implementation

Declaration

Source position: httpdefs.pp line 167

type TCookie = class(TCollectionItem)

public

  constructor Create(); override;

  

Creates a new cookie instance

  procedure Assign(); override;

  

Assigns values from another persistent object

  procedure Expire;

  

Marks the cookie as expired

  property Name: string; [rw]

  

Cookie name

  property Value: string; [rw]

  

Cookie value

  property Domain: string; [rw]

  

Cookie domain restriction

  property Path: string; [rw]

  

Path attribute of the cookie

  property Expires: TDateTime; [rw]

  

Expiration date and time of the cookie

  property MaxAge: Integer; [rw]

  

Maximum age of the cookie in seconds

  property Secure: Boolean; [rw]

  

Cookie security flag

  property HttpOnly: Boolean; [rw]

  

HTTP-only access flag

  property SameSite: TSameSite; [rw]

  

SameSite attribute of the cookie

  property Partitioned: Boolean; [rw]

  

Partitioned attribute of the cookie

  property AsString: string; [r]

  

String representation of the cookie

end;

Inheritance

TCookie

  

HTTP cookie implementation

|

TCollectionItem

|

TPersistent

|

TObject,IFPObserved

Description

TCookie represents an HTTP cookie with all its attributes. It provides properties for name, value, domain, path, expiration, security settings, and other cookie attributes.

See also

TCookies

  

Collection of HTTP cookies

TSameSite

  

Cookie SameSite attribute values


Documentation generated on: Jan 16 2026