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

AppendQueryParam(s) methods #688

Closed
tmenier opened this issue May 13, 2022 · 1 comment · Fixed by #689
Closed

AppendQueryParam(s) methods #688

tmenier opened this issue May 13, 2022 · 1 comment · Fixed by #689

Comments

@tmenier
Copy link
Owner

tmenier commented May 13, 2022

Add methods similar to SetQueryParam(s), except that never overwrite.

Example using SetQueryParam:

"http://url.com"
  .SetQueryParam("x", "1")
  .SetQueryParam("x", "2")
  .SetQueryParam("x", "3");

// result: http://url.com?x=3

Same using AppendQueryParam:

"http://url.com"
  .AppendQueryParam("x", "1")
  .AppendQueryParam("x", "2")
  .AppendQueryParam("x", "3");

// result: http://url.com?x=1&x=2&x=3

This will also form a basis for fixing #370, which on its own is a bit involved, and would be better bang for the buck to expose this functionality more generally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

1 participant