-
Notifications
You must be signed in to change notification settings - Fork 0
UrlBuilder
A UrlBuilder
instance is obtained from the global function url()
.
###s(pathSegment...)
Adds path segments to the URL. Each pathSegment
argument is a string and can may optionally contain slashes, which means a single argument may add more than one path segment. Slashes between the arguments are added automatically as needed.
###pp(pvPairs...)
Adds path parameters to the latest path segment. The argument list is partitioned into param-value pairs. An array can be passed at a param position and will be recursively flattened into more param-value pairs. Example:
pp('a','3', 'b','5', ['c','6', 'd','7'], [['e','8'], ['f','9']])
###q(pvPairs...)
Adds query parameters to the URL. The argument list is partitioned into param-value pairs. An array can be passed at a param position and will be recursively flattened into more param-value pairs. Example:
q('a','3', 'b','5', ['c','6', 'd','7'], [['e','8'], ['f','9']])
The values will be URL-encoded as needed.
###frag(f)
Sets the URL fragment (which appears at the very end of the URL, preceded by a #
sign).