param_remove

0th

Percentile

Remove key-value pairs from query strings

URLs often have queries associated with them, particularly URLs for APIs, that look like ?key=value&key=value&key=value. param_remove allows you to remove key/value pairs while leaving the rest of the URL intact.

Usage
param_remove(urls, keys)
Arguments
urls
a vector of URLs. These should be decoded with url_decode but don't have to have been otherwise processed.
keys
a vector of parameter keys to remove.
Value

the original URLs but with the key/value pairs specified by keys removed.

See Also

param_set to modify values associated with keys, or param_get to retrieve those values.

Aliases
  • param_remove
Examples
# Remove multiple parameters from a URL
param_remove(urls = "https://en.wikipedia.org/wiki/api.php?action=list&type=query&format=json",
            keys = c("action","format"))
Documentation reproduced from package urltools, version 1.4.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.