powered by
The output function will have one parameter in which you can specify the parameters using a named list.
compile(path, delimiter = "/", encode)
A function.
A character vector or a tokenData object.
tokenData
A character vector of length 1. Specifies the delimiter for the path segments.
Function to encode input strings. Defaults to utils::URLencode with the parameter reserved set to TRUE.
toPath <- compile("/path/to/resource/:Id") toPath(list(Id = "2")) toPath <- compile("public/*files") toPath(list(files = c("js", "hi.js")))
Run the code above in your browser using DataLab