node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

Query Params Got Modify

Open dorman99 opened this issue 6 years ago • 0 comments

node: 6.x.x
restify: 6.2.3

I got some unmatch query params while requesting to my api. for example if i hit http://myapi/content/1?verify=true&released=true it suppose read as

{
  verify: 'true',
  released: 'true'
}

on the req.query but instead i got

{
  verify: ['true', 'true'],
  released: 'true'
}

any ideas why this is happend ?

on my server config :

self._server.pre(cors.preflight);
self._server.use(cors.actual);
self._server.use(restify.plugins.queryParser({
   mapParams: true
}));
self._server.use(restify.plugins.bodyParser({
  mapParams: true
}));

dorman99 avatar Jan 03 '20 06:01 dorman99