Closed SurmanPP closed 2 years ago
That's weird, function params should work in both GET and POST requests.
They do work in other places.
They do work in other places.
Yes, but only with static routes. Vweb ignores args passing if routes have dynamic params:
if !route.path.contains('/:') && url_words == route_words {
https://github.com/vlang/v/blob/f0871b87a4958253d09f48a6065e4dc3984573d9/vlib/vweb/vweb.v#L527
That's weird, function params should work in both GET and POST requests.
What does this mean for this pull request and vweb? I'd rather remove this functionality in all places(in vweb), because I think it's more consisten without then with.
At least this behaviour should be documented. I can't find it anywhere.
@walkingdevel good find, needs to be fixed in vweb asap then.
Beeing a bug in vweb makes this pr obsolete
Both routes did not work because the form data was not retrieved via app.form['data_name'] but via the functions args, which is not possible with vweb.