Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a URI that has been decomposed for manipulation so that it can be reformulated.

Hierarchy

  • DecomposedUri

Index

Constructors

constructor

  • Initializes a new instance of the DecomposedUri class.

    Parameters

    • uri: string

      The URI to consume.

    Returns DecomposedUri

Properties

fragment

fragment: any

A manipulatable component of the URI that represents the fragment as a set of key-value pairs (as an object). You can add, remove, and update values in this object.

originalUri

originalUri: string

The original URI that this instance was created from.

query

query: any

A manipulatable component of the URI that represents the query string as a set of key-value pairs (as an object). You can add, remove, and update values in this object.

schemeHostAndPath

schemeHostAndPath: string

A manipulatable component of the URI that includes all parts of the URI except query and fragment.

Methods

recompose

  • recompose(): string
  • Recomposes back into a URI.

    Returns string

Static appendToPath

  • appendToPath(url: string, pathPart: string): string
  • Appends to the path of a url (while preserving the query string, hash, etc).

    Parameters

    • url: string

      The url.

    • pathPart: string

      The path to append onto the url.

    Returns string

Static getHost

  • getHost(uri: string): string
  • Gets the server host for a given URI.

    Parameters

    • uri: string

    Returns string

Static removeQueryParameters

  • removeQueryParameters(url: string, ...parameters: string[]): string
  • Removes the specified query parameters from a url.

    Parameters

    • url: string

      The url.

    • Rest ...parameters: string[]

      The parameters (keys) to remove from the url.

    Returns string