render_uri_templates {csvwr} | R Documentation |
Interpolate variable bindings into a URI template.
render_uri_templates(templates, bindings = NULL, ...)
templates |
a character vector with URI templates |
bindings |
a list of variable bindings to be interpolated into templates |
... |
further bindings specified as named function arguments |
This doesn't yet implement the whole of RFC 6570, just enough to make the tests pass
You can bind variables by passing a list to the explicit bindings
argument,
or variadically with ...
by naming arguments according to the variable name you wish to bind.
a character vector with the expanded URI
render_uri_templates("{+url}/resource?query=value", list(url="http://example.net"))
render_uri_templates("{+url}", url="http://example.net")