4
I’m having a question about url parameters. Is the following, I know there’s a way I can rescue a parameter this way users/:id
, Then I pick up with the req.params.id
, but I saw a video that the guy used this way, req.query
and in that req.query
he placed inside a variable, and all parameters he passed via url he managed to rescue.
My question is: what is the difference between them? And in what context should I use them??
If you’re using express, this documentation of them is pretty cool: http://expressjs.com/en/api.html
– Daniel Mendes