summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/http.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-03 18:02:53 +0000
committerSteven Barth <steven@midlink.org>2008-06-03 18:02:53 +0000
commit56a23c609c30cf6c477bf6523661a44821da1819 (patch)
treee7843bed1dd23f057d5cc2d61d368d8a8a6c6674 /libs/web/luasrc/http.lua
parent25ca2d2f20ad08a52bc9756e7b2f7abaeb4c7edc (diff)
* libs/web: Added support for custom query strings
Diffstat (limited to 'libs/web/luasrc/http.lua')
-rw-r--r--libs/web/luasrc/http.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/web/luasrc/http.lua b/libs/web/luasrc/http.lua
index fa8821c5a3..68dad8f1ec 100644
--- a/libs/web/luasrc/http.lua
+++ b/libs/web/luasrc/http.lua
@@ -33,4 +33,14 @@ if ENV and ENV.HASERLVER then
require("luci.sgi.haserl")
elseif webuci then
require("luci.sgi.webuci")
+end
+
+function build_querystring(table)
+ local s="?"
+
+ for k, v in pairs(table) do
+ s = s .. k .. "=" .. v .. "&"
+ end
+
+ return s
end \ No newline at end of file