Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published