Closed bbblitz closed 4 years ago
@bbblitz I'm not sure if I understood your point. You don't agree with the fact that we've some properties and some methods, is that?
I don't agree that they're documented as properties, but are actually methods (except for querystring:string
, which is actually a table)
You're correct, there're some outdated information. Thanks for letting me know, I didn't notice this issues :)
Currently, the readme makes the following claims:
Request properties:
path:string
however, request.path is a function (that returns a string),headers:table
however, request.headers is a function (that returns a table),method:function
is correct (it's a function that returns a string)querystring:string
however, request.querystring is a table (of strings)ip:string
is correctport:number
is correctResponse properties seem to be all correct.
I found the above with the below script:
Gives the output
In case it matters, I'm on Windows with luarocks using mingw32 as my compiler.
I really don't care if you make everything functions that return these things, or make them actual fields, but this inconsistency is really confusing!