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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -