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

Allow query parameters to erase() 'all but' #11352

Merged
merged 1 commit into from
May 22, 2024

Conversation

zwoop
Copy link
Contributor

@zwoop zwoop commented May 14, 2024

The optional boolean flag argument reverses the list semantics (erase all but the listed query parameters). E.g.

do_remap()
{
  borrow url = Client::URL::get();

  url.query.erase({"foo", "bar"}, true);
}

Which will remove all query parameters, except foo and bar. Alternatively, as a convenience, keep() was also added:

do_remap()
{
  borrow url = Client::URL::get();

  url.query.keep({"foo", "bar"});
}

@zwoop zwoop added the Cripts label May 14, 2024
@zwoop zwoop added this to the 10.1.0 milestone May 14, 2024
@zwoop zwoop requested a review from cmcfarlen May 14, 2024 22:35
@zwoop zwoop force-pushed the NewCriptsFeatures branch 2 times, most recently from a5543a3 to 8c0a916 Compare May 15, 2024 03:38
@brbzull0
Copy link
Contributor

[approve ci autest]

@zwoop zwoop merged commit 0f52de3 into apache:master May 22, 2024
15 checks passed
@zwoop zwoop deleted the NewCriptsFeatures branch May 22, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants