webmcp
view framework/env/request/get_param_strings.lua @ 194:654ddbcc49d0
Bugfix in autodoc.lua; Added documentation for JSON library; json.import(...) returns json.null for "null" on top-level
| author | jbe | 
|---|---|
| date | Mon Aug 11 17:38:12 2014 +0200 (2014-08-11) | 
| parents | e75abc61d135 | 
| children | 25a20bd1f416 | 
 line source
     1 --[[--
     2 params =
     3 param.get_param_strings()
     5 This function returns a table with all raw GET/POST parameters as strings or list of strings (except internal parameters like "_webmcp_path" or "_webmcp_id"). Modifications of the returned table have no side effects.
     7 --]]--
     9 function request.get_param_strings()
    10   local t = {}
    11   for key, value in pairs(request._params) do
    12     if type(value) == 'table' then
    13       t[key] = table.new(value)
    14     else
    15       t[key] = value
    16     end
    17   end
    18   return t
    19 end
