Function generateUrl

  • Generate the url with webroot for the given relative url, which can contain parameters If options.baseURL is provided, generate the absolute url pointing ro remote server

    Parameters will be URL encoded automatically

    Parameters

    • url: string

      address (can contain placeholders e.g. /call/{token} would replace {token} with the value of params.token

    • Optional params: object

      parameters to be replaced into the url

    • Optional options: UrlOptions

      options for the parameter replacement

    Returns string

    URL with webroot for the given relative URL