url_query_parse {httr2} | R Documentation |
Parse query parameters and/or build a string
Description
url_query_parse()
parses a query string into a named list;
url_query_build()
builds a query string from a named list.
Usage
url_query_parse(query)
url_query_build(query, .multi = c("error", "comma", "pipe", "explode"))
Arguments
query |
A string, when parsing; a named list when building. |
.multi |
Controls what happens when a value is a vector:
If none of these options work for your needs, you can instead supply a function that takes a character vector of argument values and returns a a single string. |
Examples
str(url_query_parse("a=1&b=2"))
url_query_build(list(x = 1, y = "z"))
url_query_build(list(x = 1, y = 1:2), .multi = "explode")
[Package httr2 version 1.1.2 Index]