From c47be2e727d1bb3e2e3aa415ec96be2a5f8a45b7 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 14 Jun 2009 08:51:43 +0000 Subject: GSoC: Documentation #2 --- libs/lucid-http/luasrc/lucid/http/handler/luci.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libs/lucid-http/luasrc/lucid/http/handler/luci.lua') 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, -- cgit v1.2.3