Skip to content

Use qs.parse if parser undefined#12

Closed
mushishi78 wants to merge 1 commit intounshiftio:masterfrom
mushishi78:master
Closed

Use qs.parse if parser undefined#12
mushishi78 wants to merge 1 commit intounshiftio:masterfrom
mushishi78:master

Conversation

@mushishi78
Copy link
Copy Markdown
Contributor

It was failing to parse query strings in tests run on node. This change seems to make it work for me, perhaps it's what you had in mind with the original condition?

@lpinca
Copy link
Copy Markdown
Member

lpinca commented Sep 24, 2015

I think that the intention is to provide the same API offered by the Node.js url module.
By default the query string is not parsed. You need to pass true or your own parser function in order to parse it.

var URL = require('url-parse');
var url = new URL('https://github.com/foo/bar?baz=qux', true);

@mushishi78
Copy link
Copy Markdown
Contributor Author

Oh okay, well I was kinda skimming so I missed that.

@mushishi78 mushishi78 closed this Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants