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

How to encode entire string #356

Open
oosharma opened this issue Dec 5, 2022 · 1 comment
Open

How to encode entire string #356

oosharma opened this issue Dec 5, 2022 · 1 comment

Comments

@oosharma
Copy link

oosharma commented Dec 5, 2022

When I am using queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'}); the result is 'foo=1,2,3', is there a way to get the entire string encoded to 'foo%3D1%2C2%2C3', which is a result of encodeURIComponent('foo=1,2,3')?

@oosharma oosharma changed the title Encoding not working Encoding not working on entire string Dec 5, 2022
@oosharma oosharma changed the title Encoding not working on entire string How to encode entire string Dec 5, 2022
@SamVerschueren
Copy link
Contributor

What about {foo: [1, 2, 3].join(',')}?

https://stackblitz.com/edit/node-2kumy1?file=index.js

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

No branches or pull requests

2 participants