Header menu logo Navs

UrlTemplate Module

Functions and values

Function or value Description

UrlTemplate.ofString template

Full Usage: UrlTemplate.ofString template

Parameters:
    template : string - The string to parse into a URL template

Returns: Result<UrlTemplate, string> A URL template if the string is a valid URL template or a string with the error message if the string is not a valid URL template

Parses a string into a URL template

template : string

The string to parse into a URL template

Returns: Result<UrlTemplate, string>

A URL template if the string is a valid URL template or a string with the error message if the string is not a valid URL template

UrlTemplate.toUrl template routeParams

Full Usage: UrlTemplate.toUrl template routeParams

Parameters:
    template : string - The URL template to convert into a URL
    routeParams : IReadOnlyDictionary<string, obj> - The parameters to use to convert the URL template into a URL

Returns: Result<string, string list> A string with the URL if the parameters are valid or a list of string with the error messages if the parameters are not valid

Converts a URL template into a well formed and matching URL

template : string

The URL template to convert into a URL

routeParams : IReadOnlyDictionary<string, obj>

The parameters to use to convert the URL template into a URL

Returns: Result<string, string list>

A string with the URL if the parameters are valid or a list of string with the error messages if the parameters are not valid

Type something to start searching.