local Luan = require "luan:Luan.luan" local error = Luan.error local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" local function print_simple() Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>

Hello!

<% end local function print_event() Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>

Hello!

<% end local function print_stack() Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>

Hello!

<% end local function print_onfocus() Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>

Hello!

<% end local function print_current() Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>

Hello!

<% end local function print_production() Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>

Hello!

<% end return function() if Http.request.method == "POST" then local type = Http.request.parameters.type if type == "simple" then print_simple() elseif type == "event" then print_event() elseif type == "stack" then print_stack() elseif type == "onfocus" then print_onfocus() elseif type == "current" then print_current() elseif type == "production" then print_production() end return end Io.stdout = Http.response.text_writer() Http.response.headers["content-type"] = "text/html; charset=utf-8" %>
<% end