comparison scripts/test.luan @ 1152:21d157b153fe

change http parameters interface
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 04 Feb 2018 19:25:12 -0700
parents 86e477945676
children 0f2890e2ba16
comparison
equal deleted inserted replaced
1151:dbb3cb906482 1152:21d157b153fe
34 end 34 end
35 35
36 local page 36 local page
37 37
38 init() 38 init()
39 Http.request.parameter.code = "require('luan:Io.luan').print 'hi'" 39 Http.request.parameters.code = "require('luan:Io.luan').print 'hi'"
40 page = get_page "/run" 40 page = get_page "/run"
41 trim(page) == "hi" or error "failed" 41 trim(page) == "hi" or error "failed"
42 42
43 init() 43 init()
44 Http.request.parameter.cmd = "'ab'..'cd'" 44 Http.request.parameters.cmd = "'ab'..'cd'"
45 page = get_page "/shell" 45 page = get_page "/shell"
46 find(page,"abcd") or error "failed" 46 find(page,"abcd") or error "failed"
47 47
48 init() 48 init()
49 page = get_page "/dump" 49 page = get_page "/dump"
80 80
81 init() 81 init()
82 web_search() 82 web_search()
83 83
84 init() 84 init()
85 Http.request.parameter.query = "" 85 Http.request.parameters.query = ""
86 Http.request.parameter.rows = "100" 86 Http.request.parameters.rows = "100"
87 Http.request.parameter.sort = "" 87 Http.request.parameters.sort = ""
88 web_search() 88 web_search()
89 89
90 90
91 -- website 91 -- website
92 92
103 init(); get_page "/examples/hi" 103 init(); get_page "/examples/hi"
104 init(); get_page "/examples/hi2" 104 init(); get_page "/examples/hi2"
105 init(); get_page "/examples/shell" 105 init(); get_page "/examples/shell"
106 106
107 init() 107 init()
108 Http.request.parameter.name = "bob" 108 Http.request.parameters.name = "bob"
109 page = get_page "/examples/hi2" 109 page = get_page "/examples/hi2"
110 find(page,"bob") or error "failed" 110 find(page,"bob") or error "failed"
111 111
112 112
113 print "done" 113 print "done"