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

Do we have sensible defaults for .serialize(params, encode)? #52

Open
matthewdunsdon opened this issue Apr 19, 2017 · 4 comments
Open
Labels

Comments

@matthewdunsdon
Copy link

On a couple of projects, team have made use of .serialize(params, encode).

By default, it encodes parameters with the identify function.

Should it not use the encodeURIComponent by default and allow people to opt in if they want to avoid encoding?

I do appreciate that serialize is not documented in the readme.md file.

@matthewdunsdon
Copy link
Author

@zambezi/contributors Please jump in and share your thoughts. 😄

@mstade
Copy link
Member

mstade commented Apr 20, 2017

Do we have any data to suggest there's a need for a custom encoding function at all? I.e. should we not just always encode?

@matthewdunsdon
Copy link
Author

Searching through everyone's code, I can not see anyone who is passing in a custom function.

The only think I am not sure of is whether anyone has had to do their own encodeURIComponent on the input they pass to serialize. That data is really hard to mine with the current tools I have available.

@mstade
Copy link
Member

mstade commented Apr 20, 2017

Maybe we can pair up on doing some research? I'd be all for dropping this parameter if we can, and just applying encoding by default, or something else sensible like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants