Answer the question
In order to leave comments, you need to log in
How to pass many parameters in a route?
Hello!
Below is an example, but the problem is, and if you need to pass 10 parameters, how to do it right?
app.put('/test/:id/:text', async (req, res) => {
})
Answer the question
In order to leave comments, you need to log in
If you have 10 parameters in a route, it means that you are doing something wrong. Perhaps it is worth passing some part of the parameters in the request body. And yes, if you have 10 parameters that make up the path, all 10 must be specified.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question