Header menu logo Navs

UrlParser Module

Functions and values

Function or value Description

UrlParser.ofString url

Full Usage: UrlParser.ofString url

Parameters:
    url : string - The URL to parse

Returns: Result<UrlInfo, string> A result that contains the different components of the URL if the URL is valid or a string with the error message if the URL is invalid

Parses a URL and returns the different components of it

url : string

The URL to parse

Returns: Result<UrlInfo, string>

A result that contains the different components of the URL if the URL is valid or a string with the error message if the URL is invalid

UrlParser.ofUri uri

Full Usage: UrlParser.ofUri uri

Parameters:
    uri : Uri - The URI to convert to a string

Returns: string A string representation of the URI which can then be used to parse the URL

Takes an existing URI and returns a string representation of it

This is particularly useful to enable deep linking in an application. You'd use this function to convert a URI to a string and then use the string

uri : Uri

The URI to convert to a string

Returns: string

A string representation of the URI which can then be used to parse the URL

Type something to start searching.