This library provides RFC6570 'URI Template' procedures.
Parses the given URI template into S-expression.
The given in must be either a textual input port or a string.
The parsed form consists with the following rules:
uri-template ::= (template-unit)
template-unit ::= string
template-unit ::= (template)
template ::= (operator varaible)
operator ::= character
variable ::= string
variable ::= (string modifier)
modifier ::= *
modifier ::= positive exact integer
operator must be a valid URI template operator
(parse-uri-template "http://{domain*}/{/path}")
(http:// ((domain \*)) / (/ path))
Expands the given uri-template and returns a string.
The parameter must be a vector of pair of string and value.
The value must be one of the followings:
string
list of string
vector of pair of string
(expand-uri-template '((#\? ("keys" *))) '#(("keys" . #(("semi" . ";") ("dot" . ".") ("comma" . ",")))))
?semi=%3B&dot=.&comma=%2C