comparison website/src/examples/hi2_simply_html.luan @ 497:55f9f74f1e55

Http.request is now pure luan
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 17 May 2015 19:25:47 -0600
parents 598123096772
children 92c3d22745b8
comparison
equal deleted inserted replaced
496:c65df5b25932 497:55f9f74f1e55
3 local Http = require "luan:http/Http" 3 local Http = require "luan:http/Http"
4 4
5 5
6 local function form() %> 6 local function form() %>
7 <form> 7 <form>
8 <label>What is you name?</label> 8 <label>What is your name?</label>
9 <input name="name" margin-bottom="1em"> 9 <input name="name" margin-bottom="1em">
10 <input type=submit> 10 <input type=submit>
11 </form> 11 </form>
12 <% end 12 <% end
13 13
17 <% end 17 <% end
18 18
19 19
20 function respond() 20 function respond()
21 Io.stdout = Http.response.text_writer() 21 Io.stdout = Http.response.text_writer()
22 name = Http.request.parameters.name 22 name = Http.request.parameter.name
23 %> 23 %>
24 <html> 24 <html>
25 <head> 25 <head>
26 <% Html.simply_html_head() %> 26 <% Html.simply_html_head() %>
27 </head> 27 </head>