Callback to resolve a URIVariable by a given variable name. The variable name is always resolved to a simple string and the returned value should not be encoded or otherwise processed for the URI. To conform to RFC 6570 the callback MUST always produce the same variables for any given variable name. The values MUST be determined before template expansion.
Exception thrown on malformed URI templates
Expands a URI template as defined in RFC 6570.
Expands a variable template part of a URI template as defined in RFC 6570.
Checks if the given literal parameter is valid according to RFC 6570 section 2.1.
Checks if the given literal parameter is valid according to RFC 6570 section 2.3.
Checks if the given literal parameter is valid according to RFC 6570 section 2.1.
Checks if the given literal parameter is valid according to RFC 6570 section 2.3.
Tagged union for template URI variables. Implementation tags the length of the arrays for the type.
import uritemplate; string uriTemplate = "https://cool.webfreak.org/{user}/profile{?fields*}"; assert(uriTemplate.expandTemplateURIString([ "user": URIVariable("bob"), "fields": URIVariable([ "address", "name", "birthday" ]) ]) == "https://cool.webfreak.org/bob/profile?fields=address&fields=name&fields=birthday"); assert(uriTemplate.expandTemplateURIString([ "user": URIVariable(["bob!", "Straße"]), "fields": URIVariable([ "address", "name", "birthday" ]) ]) == "https://cool.webfreak.org/bob%21,Stra%C3%9Fe/profile?fields=address&fields=name&fields=birthday");
Implements RFC 6570 (URI Template)