annotate src/tools/request.txt.luan @ 26:0837820b97fb

tinymce work
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 20 Jul 2022 15:47:18 -0600
parents 2f20b11affdd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Binary = require "luan:Binary.luan"
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local Io = require "luan:Io.luan"
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local Http = require "luan:http/Http.luan"
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 return function()
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 Io.stdout = Http.response.text_writer()
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 %><%= Http.request.raw_head %><%
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 if Http.request.body ~= nil then
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 %><%=Binary.to_string(Http.request.body,"utf-8")%><%
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 end
2f20b11affdd add tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 end