We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
register()
app.route('POST:/book', function3) // http://127.0.0.1/book by POST app.route('DELETE:/book', function4) // http://127.0.0.1/book by DELETE
也许增加个函数用于接收 http method?例如:
app.routeX('/book', function3, ['POST']) app.routeX('/book', function4, ['DELETE']) app.route_get('/book', function3) app.route_delete('/book', function4)
App
例如:
struct Cfg { debug bool = false static_dirs map[string]string listen_address string = '127.0.0.1' listen_port int = 8012 } fn main() { cfg := Cfg{debug: false, static_dirs: {'/dir1': '/opt/www/dir1'}, listen_address: '0.0.0.0', listen_port: 8012} mut app := valval.new_app(cfg) app.route('/', hello) valval.runserver() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
register()
。还没人用 V 和 valval,真没必要在这个阶段考虑向后兼容的问题。也许增加个函数用于接收 http method?例如:
App
能否扩展一下,直接传入一个 map,里面可以有参数:例如:
The text was updated successfully, but these errors were encountered: