Is there a difference between obtaining QUERY_STRING arguments via req.query[myParam]
and req.params.myParam
? If so, when should I use which?
Given this route
app.get('/hi/:param1', function(req,res){} );
and given this URL
http://www.google.com/hi/there?qs1=you&qs2=tube
You will have:
req.query
{
qs1: 'you',
qs2: 'tube'
}
req.params
{
param1: 'there'
}