Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a URI.

Hierarchy

  • Uri

Index

Constructors

constructor

  • new Uri(uri?: string): Uri
  • Creates a new Uri object.

    Parameters

    • Optional uri: string

      An optional string representation of a URI to build from.

    Returns Uri

Properties

fragment

fragment: string

The fragment, also known as the hash.

host

host: string

The host name.

password

password: string

The user password.

path

path: string

The path.

port

port: string

The port.

queryValues

queryValues: Map<string, string> = new Map<string, string>()

Maps individual query parameters to query values.

scheme

scheme: string

The scheme of the URI (also known as protocol). E.g. "http", "ftp", etc.

user

user: string

The user name.

Accessors

authority

authority:

The authority, i.e. the combination of user info, host, and port.

isAbsolute

isAbsolute:

Determines whether this URI is absolute.

isRelative

isRelative:

Determines whether this URI is relative.

query

query:

The full query string.

Methods

clone

  • Creates a deep copy of this URI.

    Returns Uri

toAbsoluteUri

  • toAbsoluteUri(baseUri?: Uri | string): any
  • Attempts to converts a URI into an absolute URI.

    Parameters

    • Optional baseUri: Uri | string

      The base URI that acts as the context for a relative URI.

    Returns any

    A new Uri object that represents the transformation of the the current URI in relation to baseUri. The algorithm follows the one outlined in RFC-3986 section 5.2.2. Note that the result might not actually be an absolute URI if baseUri is not itself absolute.

toString

  • toString(): string
  • ToString.

    Returns string