P
P
pandaa2019-04-17 09:33:44
Node.js
pandaa, 2019-04-17 09:33:44

How to pass multiple parameters to URL in express?

app.get('/im:id', function (req, res) {
  var Params1 = req.params.id;
  var Params2 //???
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shvets, 2019-04-17
@pandaa

app.get('/im/:id/:param2', function (req, res) {
  var Params1 = req.params.id;
  var Params2 = req.params.param2;
}

L
Lynn "Coffee Man", 2019-04-17
@Lynn

The parameters from the query string are, oddly enough, in req.query .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question