webmcp
diff framework/env/request/set_perm_param.lua @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children | d69106e271fc |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/request/set_perm_param.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,13 @@ 1.4 +--[[-- 1.5 +request.set_perm_param( 1.6 + key, -- name of parameter 1.7 + value -- value of parameter 1.8 +) 1.9 + 1.10 +Setting a so-called "permanent parameter" with this function will cause a key value pair to be included in every HTTP link inside the application. It is used as a cookie replacement, where cookies are not suitable, e.g. because you want multiple browser windows to not interfere with each other. 1.11 + 1.12 +--]]-- 1.13 + 1.14 +function request.set_perm_param(key, value) 1.15 + request._perm_params[key] = value 1.16 +end