@nikifilini/fastify-qs

4.0.0 • Public • Published

fastify-qs

Build Status GitHub issues GitHub license npm

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

License

MIT © Vano Devium

Package Sidebar

Install

npm i @nikifilini/fastify-qs

Weekly Downloads

1

Version

4.0.0

License

MIT

Unpacked Size

6.41 kB

Total Files

8

Last publish

Collaborators

  • lunavod