request/qs

Name: qs

Owner: request

Description: Wrapper for qs and querystring modules

Created: 2015-12-01 09:33:44.0

Updated: 2015-12-02 07:36:02.0

Pushed: 2015-12-02 09:48:07.0

Homepage: null

Size: 5

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

@request/qs

Wrapper for the qs and querystring modules.

See @request/core for more details.

defaults

By default @request/qs uses the qs module:

qs = require('@request/qs')

arse(str)
tringify(obj)
qs options
qs = require('@request/qs')

options = {
 parse options
rse: {
qs: {sep: ';', eq: ':'}

 stringify options
ringify: {
qs: {sep: ';', eq: ':'}



arse(str, options)
tringify(obj, options)
using querystring

To use the querystring module instead, set the parse and stringify option keys to querystring:

qs = require('@request/qs')

options = {
rse: {querystring: {}},
ringify: {querystring: {}}


arse(str, options)
tringify(obj, options)
querystring options

Here sep and eq are the second and third argument for the querystring's parse and stringify methods. The options key is the forth object argument:

qs = require('@request/qs')

options = {
 parse options
rse: {
querystring: {sep: ';', eq: ':', options: {}}

 stringify options
ringify: {
querystring: {sep: ';', eq: ':', options: {}}



arse(str, options)
tringify(obj, options)

The stringified result is RFC3986 encoded.

Notice

This module may contain code snippets initially implemented in request by request contributors.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.