Mercurial Hosting > chat
diff src/tools/request.txt.luan @ 6:e22a1ba4b2ed
misc
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Oct 2024 16:47:11 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/request.txt.luan Tue Oct 29 16:47:11 2024 -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