1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00
esp8266/www/lua/test_cookies.lua
cameronrich ab7cbe8310 added lua test cases
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@128 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
2007-09-17 21:48:39 +00:00

15 lines
344 B
Lua

local cookies = require"cgilua.cookies"
CL_COOKIE = "cgilua_cookie"
local test = cookies.get (CL_COOKIE)
cookies.set (CL_COOKIE, os.date())
cgilua.htmlheader ()
cgilua.put ([[
<h1>Testing Cookies library</h1>
]]..CL_COOKIE..' = '..tostring(test)..[[<br>
Assigning current date to cookie!<br>
Reload this script to check cookie's value!
]])