84 lines
1.5 KiB
Lua
84 lines
1.5 KiB
Lua
local M = {}
|
||
|
||
|
||
--[[
|
||
FUNCTION: 发送字符串
|
||
PARAM
|
||
value : 内容
|
||
--]]
|
||
function M.send(value)
|
||
return fw_response:send(value)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 发送字符串
|
||
PARAM
|
||
value : 内容
|
||
state_num : 状态码
|
||
state_sec : 状态描述
|
||
--]]
|
||
function M.sendex(value, state_num, state_esc)
|
||
return fw_response:sendex(value, state_num, state_esc)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 发送文件
|
||
PARAM
|
||
filepath : 文件路径
|
||
downbaud : 限速每秒字节(-1=不限速)
|
||
state_num : 状态码
|
||
state_sec : 状态描述
|
||
--]]
|
||
function M.send_file(filepath, downbaud, state_num, state_desc)
|
||
return fw_response:send_file(filepath, downbaud, state_num, state_desc)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 重定向请求
|
||
PARAM
|
||
filepath : 文件路径
|
||
MovedPermanently : 是否永久重定向
|
||
--]]
|
||
function M.redirect(filepath,MovedPermanently)
|
||
return fw_response:redirect(filepath,MovedPermanently)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 转发请求
|
||
PARAM
|
||
filepath : 转发路径
|
||
--]]
|
||
function M.forward(filepath)
|
||
return fw_response:forward(filepath)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 设置响应头。
|
||
PARAM
|
||
name : 名称
|
||
value : 值
|
||
--]]
|
||
function M.header(name, value)
|
||
fw_response:header(name, value)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 置后端渲染。
|
||
PARAM
|
||
name : 名称
|
||
value : 值
|
||
--]]
|
||
function M.set(name, value)
|
||
fw_response:set(name, value)
|
||
end
|
||
|
||
--[[
|
||
FUNCTION: 置后端渲染。
|
||
PARAM
|
||
table : 名称
|
||
--]]
|
||
function M.sets(tab)
|
||
fw_response:sets(tab)
|
||
end
|
||
|
||
return M |