@nikifilini/fastify-qs
v4.0.0
Published
Fastify plugin for querystring parsing with qs
Downloads
3
Readme
fastify-qs
A plugin for Fastify that adds support for parsing URL query parameters with qs.
Plugin accepts any options from qs.parse method
Install
npm i fastify-qs
Example
const fastify = require('fastify')()
fastify.register(require('fastify-qs'), {})
fastify.get('/*', (req, reply) => {
req.query // -> { a: ['1', '2'] }
reply.send('')
})
// GET: 'http://127.0.0.1/?a[]=1&a[]=2
If you want temporary disable qs parsing, pass
disabled: true
to plugin options:fastify.register(require('fastify-qs'), { disabled: true })