Skip to content

AppendQueryParam(s) methods #688

Description

@tmenier

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Released

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions