summaryrefslogtreecommitdiffhomepage
path: root/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sgi-wsapi/luasrc/sgi/wsapi.lua')
-rw-r--r--libs/sgi-wsapi/luasrc/sgi/wsapi.lua9
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 = {}