node.js - Express does not return all query string parameters -
route
app.get('/pdf/:id', function(req, res) {
request
get http://localhost/pdf/123?option=456&clientid=789
i get
req.query == { option: '456' } req.params == { id: '123' }
how comes second query parameter cut off? delimiter standard '&'
if using curl or terminal command, & has special meaning there. try gettig inside quotes as
curl 'http://localhost/pdf/123?option=456&clientid=789'
Comments
Post a Comment