Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extended options to be passed to qs library #98

Closed
wants to merge 4 commits into from

Conversation

Drarok
Copy link

@Drarok Drarok commented May 7, 2015

This allows the options such as arrayLimit and delimiter to be passed to the qs library.

app.use('/path', bodyParser.urlencoded({
  extended: {
    arrayLimit: 0,
    delimiter: ';'
  }
}));

The main benefit of this is that setting arrayLimit to 0 causes arrays to be represented as objects, allowing "sparse" arrays like the following:

// foo[0]=1&foo[5]=hello
{ foo: { 0: 1, 5: "hello" } }

@Drarok
Copy link
Author

Drarok commented May 7, 2015

Tests pass locally, the error on Travis appears to be a timeout?

@dougwilson
Copy link
Contributor

Tests pass locally, the error on Travis appears to be a timeout?

Seems to be some subtle change in the latest patch version of on-finished i.r.t Node.js 0.8. I'm' taking a look.

@fatfisz
Copy link

fatfisz commented Nov 10, 2015

We could allow all the other options, like allowDots, to be set too. Could I take over this?

@dougwilson
Copy link
Contributor

Because the qs module is officially been abandoned, we are going to switch to a different library, so we don't want to expose any options to qs through our API, otherwise we cannot easily switch to an alternative.

@dougwilson dougwilson closed this Dec 16, 2015
@expressjs expressjs deleted a comment from clayzermk1 Jun 29, 2018
@expressjs expressjs deleted a comment from solidgoldpig Jun 29, 2018
@expressjs expressjs locked and limited conversation to collaborators Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants