Declaration¶
Source position: httpdefs.pp line 170
type
TCookie = class(TCollectionItem)
public
constructor Create;
procedure Assign;
procedure Expire;
property Name: string; {rw}
property Value: string; {rw}
property Domain: string; {rw}
property Path: string; {rw}
property Expires: TDateTime; {rw}
property MaxAge: Integer; {rw}
property Secure: Boolean; {rw}
property HttpOnly: Boolean; {rw}
property SameSite: TSameSite; {rw}
property Partitioned: Boolean; {rw}
property AsString: string; {r}
end;
Inheritance¶
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.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| AsString read only | public | String representation of the cookie |
| Domain | public | Cookie domain restriction |
| Expires | public | Expiration date and time of the cookie |
| HttpOnly | public | HTTP-only access flag |
| MaxAge | public | Maximum age of the cookie in seconds |
| Name | public | Cookie name |
| Partitioned | public | Partitioned attribute of the cookie |
| Path | public | Path attribute of the cookie |
| SameSite | public | SameSite attribute of the cookie |
| Secure | public | Cookie security flag |
| Value | public | Cookie value |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Assign | public | Assigns values from another persistent object |
| Create | public | Creates a new cookie instance |
| Expire | public | Marks the cookie as expired |