set_cookie
设置Cookie
声明
void set_cookie(Response self, string name, string value, map options = nil)
参数
参数名 | 描述 |
---|---|
self | |
name | |
value | |
options | @todo - path (string) cookie的路径。默认为"/"。 - expires cookie的过期日期。如果未指定则创建会话cookie。 - domain (string) cookie的域名。默认为应用程序的域名。 - max_age (int) 设置相对于当前时间的到期时间(毫秒)。 - secure (bool) 将cookie标记为仅与HTTPS一起使用。 - http_only (bool) 将cookie标记为仅可由web服务器访问。 - version (int) |