We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
parse_query("?a=1&a=2") # $a # [1] "1" # # $a # [1] "2"
Per RFC 6570 6.2.1, should parse_body return something like?
# $a # [1] "1" "2"
Something like that could do it, could PR if you think it makes sense. Thank you for your consideration.
parse_query <- function (query) { if (is.raw(query)) query <- rawToChar(query) stopifnot(is.character(query)) query <- sub("^[?]", "", query) query <- chartr("+", " ", query) argstr <- strsplit(query, "&", fixed = TRUE)[[1]] args <- lapply(argstr, function(x) { curl::curl_unescape(strsplit(x, "=", fixed = TRUE)[[1]]) }) values <- lapply(args, `[`, 2) keys <- vapply(args, `[`, character(1), 1) values <- sapply(unique(keys), function(x) do.call(c, values[x == keys]), simplify = FALSE) return(values) } parse_query("?a=1&a=2") # $a # [1] "1" "2"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Per RFC 6570 6.2.1, should parse_body return something like?
Something like that could do it, could PR if you think it makes sense. Thank you for your consideration.
The text was updated successfully, but these errors were encountered: