node-restify
node-restify copied to clipboard
Query Params Got Modify
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
}));