Can we get the variables in the query string in Node.js just like we get them in $_GET
in PHP?
I know that in Node.js we can get the URL in the request.
From my point of view I think that many people mix two different concepts. During the REST development I was familiar with passing information in the URL with two ways "path variables" and "request parameters"(query parameters). The RFC describes the parts of URI like this: enter link description here So I understood that author would like to know how to pass request parameters. I would only want to make the topic easier to understand, but the solution was mentioned here many times.
You can get query parameters from the URI with request.query.
, the second mentioned solution was request.params.
and with this you can get the path variables.