- Code: Select all
- function main( web, req )
- local mehtod = web:method ( )
- if ( method == GET ) then
- web:page ( "Get.", 200, "OK" )
- elseif ( method == POST ) then
- web:page ( "Post.", 200, "OK" )
- end
- end
- function main( web, req )
- local mehtod = web:method ( )
- if ( method == GET ) then
- web:page ( "Get.", 200, "OK" )
- elseif ( method == POST ) then
- web:page ( "Post.", 200, "OK" )
- end
- end
- function main( web, req )
- local mehtod = web:method ( )
- web:page ( method, 200, "OK" )
- end
Apparently, somethings wrong with the above code. Do anyone know how to get this to work?Error
bad argument #1 to 'length' (string expected, got nil)
Stack Trace
1 C function
2[(tail call)]:-1
3[[string "main.lua"]]:130
4[(tail call)]:-1
5 C function
6 C function
7 C function
Users browsing this forum: No registered users and 0 guests