A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/robsontenorio/vue-api-query/issues/214 below:

array values are not parsing properly as per the documentation · Issue #214 · robsontenorio/vue-api-query · GitHub

There is this line where we are parsing the custom params payload with encode: false. However, if we pass an array, it won't stringy properly. For this, we need to pass an extra parameter.

var qs = require("qs")
qs.stringify({'a':'asdf', 'b': ['a','b']}, {encode: false, arrayFormat: 'comma'})

will produce the output "a=asdf&b=a,b" as intended.

But the current code only has encode: false as an option. Without the arrayFormat, we will get output something like this.

var qs = require("qs")
qs.stringify({'a':'asdf', 'b': ['a','b']}, {encode: false})

Output: "a=asdf&b[0]=a&b[1]=b"

link: https://github.com/robsontenorio/vue-api-query/blob/dev/src/Parser.js#L155

Hope the problem is clear.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4