Mercurial Hosting > luan
diff host/admin/src/private/tools/request.txt.luan @ 1995:301a6561fb6b
add host/admin
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 04 Jul 2025 10:25:38 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/host/admin/src/private/tools/request.txt.luan Fri Jul 04 10:25:38 2025 -0600 @@ -0,0 +1,12 @@ +local Binary = require "luan:Binary.luan" +local Io = require "luan:Io.luan" +local Http = require "luan:http/Http.luan" + + +return function() + Io.stdout = Http.response.text_writer() + %><%= Http.request.raw_head %><% + if Http.request.body ~= nil then + %><%=Binary.to_string(Http.request.body,"utf-8")%><% + end +end