Skip to contents

Appends a named list of query parameters to a base URL, URL-encoding both names and values and dropping parameters whose value is the empty string.

Usage

parse_queries(url, query_list)

Arguments

url

The base URL.

query_list

A named list of query parameters.

Value

The URL with the query string appended (or the base URL unchanged when there are no parameters to add).

Examples

parse_queries("https://example.com", list(a = "1", b = "2"))
#> [1] "https://example.com?a=1&b=2"