Skip to content
A plugin for Fastify that adds support for parsing URL query parameters with qs
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.gitignore
.travis.yml
LICENSE.MD
README.MD
package.json
plugin.js

README.MD

fastify-qs

Build Status

A plugin for Fastify that adds support for parsing URL query parameters with qs.

Plugin accept any options from qs.parse method

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 })

License

MIT © Vano Devium

You can’t perform that action at this time.