Mercurial Hosting > luan
comparison website/src/examples/hi2.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 |
---|---|
6 %> | 6 %> |
7 <html> | 7 <html> |
8 <body> | 8 <body> |
9 <h1>Hello</h1> | 9 <h1>Hello</h1> |
10 <form> | 10 <form> |
11 What is you name? | 11 What is your name? |
12 <input name="name"> | 12 <input name="name"> |
13 <input type=submit> | 13 <input type=submit> |
14 </form> | 14 </form> |
15 </body> | 15 </body> |
16 </html> | 16 </html> |
28 <% | 28 <% |
29 end | 29 end |
30 | 30 |
31 function respond() | 31 function respond() |
32 Io.stdout = Http.response.text_writer() | 32 Io.stdout = Http.response.text_writer() |
33 name = Http.request.parameters.name | 33 name = Http.request.parameter.name |
34 if name == nil then | 34 if name == nil then |
35 form() | 35 form() |
36 else | 36 else |
37 hello() | 37 hello() |
38 end | 38 end |