Lets say I have a form with method=post and action=/welcome
If I register the URL like:
var app = Davis(function () {
this.post('/welcome', function (req) {
console.log(req.params);
})
})
I will get all the input parameters from the form (req.params). Which is nice degrading behavior.
However if use the ":pattern" I will only get the patterns matched as parameters. That is below I will only have the 'name' parameter as a request parameter.
var app = Davis(function () {
this.post('/welcome/:name', function (req) {
console.log(req.params)
})
})
Lets say I have a form with method=post and action=/welcome
If I register the URL like:
I will get all the input parameters from the form (req.params). Which is nice degrading behavior.
However if use the ":pattern" I will only get the patterns matched as parameters. That is below I will only have the 'name' parameter as a request parameter.
This seems like a bug.