Module cgilua.cookies
Cookies Library
Info:
- Release: $Id: cookies.lua,v 1.8 2008/04/24 13:42:04 mascarenhas Exp $
Functions
| set (name, value, options) | Sets a value to a cookie, with the given options. |
| sethtml (name, value, options) | Sets a value to a cookie, with the given options. |
| get (name) | Gets the value of a cookie. |
| delete (name, options) | Deletes a cookie, by setting its value to "xxx". |
Functions
- set (name, value, options)
-
Sets a value to a cookie, with the given options.
Generates a header "Set-Cookie", thus it can only be used in Lua Scripts.
Parameters:
- name String with the name of the cookie.
- value String with the value of the cookie.
- options Table with the options (optional).
- sethtml (name, value, options)
-
Sets a value to a cookie, with the given options.
Generates an HTML META tag, thus it can be used in Lua Pages.
Parameters:
- name String with the name of the cookie.
- value String with the value of the cookie.
- options Table with the options (optional).
- get (name)
-
Gets the value of a cookie.
Parameters:
- name String with the name of the cookie.
Returns:
-
String with the value associated with the cookie.
- delete (name, options)
-
Deletes a cookie, by setting its value to "xxx".
Parameters:
- name String with the name of the cookie.
- options Table with the options (optional).