Contents

init(template:variables:)

Creates a new URL by expanding the RFC 6570 template and variables.

Declaration

init?(template: URL.Template, variables: [URL.Template.VariableName : URL.Template.Value])

Parameters

  • template:

    The RFC 6570 template to be expanded.

  • variables:

    Variables to expand in the template.

Discussion

This will fail if variable expansion does not produce a valid, well-formed URL.

All text will be converted to NFC (Unicode Normalization Form C) and UTF-8 before being percent-encoded if needed.