expandTemplateURIString

Expands a URI template as defined in RFC 6570.

  1. string expandTemplateURIString(string templateUri, VariableCallback resolveVariable, bool strict)
  2. string expandTemplateURIString(string templateUri, URIVariable[string] variables, bool strict)
    @safe
    string
    expandTemplateURIString
    (,
    scope const URIVariable[string] variables
    ,
    bool strict = false
    )
  3. string expandTemplateURIString(string templateUri, string[string] variables, bool strict)

Parameters

templateUri string

Given URI template as defined in RFC 6570.

strict bool

Validate entire string strictly according to RFC 6570. Does NOT perform unicode code-point validation. Performs character-by-character checks for exact grammar checks.

Return Value

Type: string

The expanded URI (GC-allocated) or if there is no template in the URI, the templateUri parameter as given.

Throws

TemplateURIFormatException on attempted use of a reserved operator, invalid variable specifications or strict issues.

Meta