Skip to content

Instantly share code, notes, and snippets.

@ganeshkbhat
Created October 4, 2018 03:05
Show Gist options
  • Select an option

  • Save ganeshkbhat/10e6ab54533db758b363f05af5355bf1 to your computer and use it in GitHub Desktop.

Select an option

Save ganeshkbhat/10e6ab54533db758b363f05af5355bf1 to your computer and use it in GitHub Desktop.
ExpressJS Series: Getting the req.query
app.post("/someUrl/:categoryId/:someName", function(req, res) {
// Request to /someUrl/12/gary?username=ganesh&password=shouldnotbehere
res.send(200).send({result: 'Query params as object', queryParams: req.query});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment