diff options
author | Steven Barth <steven@midlink.org> | 2009-06-14 08:51:43 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-06-14 08:51:43 +0000 |
commit | c47be2e727d1bb3e2e3aa415ec96be2a5f8a45b7 (patch) | |
tree | 40d9202363c5e81f9fe38b4d52a1cfa889792cda /libs/lucid-http/luasrc/lucid/http/handler/luci.lua | |
parent | f9263e00c1371eff6ace0252143236d6bf6f2ce2 (diff) |
GSoC: Documentation #2
Diffstat (limited to 'libs/lucid-http/luasrc/lucid/http/handler/luci.lua')
-rw-r--r-- | libs/lucid-http/luasrc/lucid/http/handler/luci.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/lucid-http/luasrc/lucid/http/handler/luci.lua b/libs/lucid-http/luasrc/lucid/http/handler/luci.lua index c54e39366a..d816aae13b 100644 --- a/libs/lucid-http/luasrc/lucid/http/handler/luci.lua +++ b/libs/lucid-http/luasrc/lucid/http/handler/luci.lua @@ -19,8 +19,15 @@ local srv = require "luci.lucid.http.server" local coroutine = require "coroutine" local type = type +--- LuCI web handler +-- @cstyle instance module "luci.lucid.http.handler.luci" +--- Create a LuCI web handler. +-- @class function +-- @param name Name +-- @param prefix Dispatching prefix +-- @return LuCI web handler object Luci = util.class(srv.Handler) function Luci.__init__(self, name, prefix) @@ -28,15 +35,24 @@ function Luci.__init__(self, name, prefix) self.prefix = prefix end +--- Handle a HEAD request. +-- @param request Request object +-- @return status code, header table, response source function Luci.handle_HEAD(self, ...) local stat, head = self:handle_GET(...) return stat, head end +--- Handle a POST request. +-- @param request Request object +-- @return status code, header table, response source function Luci.handle_POST(self, ...) return self:handle_GET(...) end +--- Handle a GET request. +-- @param request Request object +-- @return status code, header table, response source function Luci.handle_GET(self, request, sourcein) local r = http.Request( request.env, |