diff options
author | Steven Barth <steven@midlink.org> | 2008-06-15 12:34:16 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-15 12:34:16 +0000 |
commit | 961bfcf77f6bf114e721a418220c2d6a3ef1379c (patch) | |
tree | 10d8143b4c106dfcade5ee480ce75c184cdd4b79 /libs/sgi-wsapi/luasrc | |
parent | 8b0524cd919cec9deba8b8f63033823fa744f1e6 (diff) |
* Generalized HTTP-API
Diffstat (limited to 'libs/sgi-wsapi/luasrc')
-rw-r--r-- | libs/sgi-wsapi/luasrc/sgi/wsapi.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua index e7082493c..f77ac5c5b 100644 --- a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua +++ b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua @@ -26,13 +26,12 @@ limitations under the License. module("luci.sgi.wsapi", package.seeall) require("luci.http") require("luci.dispatcher") -require("wsapi.request") +require("luci.http.protocol") function run(wsapi_env) - local r = luci.http.Request() - r.env = wsapi_env - r.request = wsapi.request.parse_post_data(wsapi_env, - wsapi.request.parse_qs(wsapi_env.QUERY_STRING)) + local r = luci.http.Request(wsapi_env, wsapi_env.input, wsapi_env.error) + r.postds = function() return wsapi.request.parse_post_data(wsapi_env) end + r.getds = function() return wsapi.request.parse_qs(wsapi_env.QUERY_STRING) end local res, id, data1, data2 = true, 0, nil, nil local headers = {} |