Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RelativeUri

It is a wrapper over the outdated and non-intuitive Node.js URL.

Hierarchy

  • RelativeUri

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Parse uri and retain relative part

    Parameters

    • Default value uri: string = ""

      absolute or relative uri string to be parsed

    Returns RelativeUri

Properties

query

query: Query = new Query()

Query part of the uri.

Accessors

fragment

  • get fragment(): string | null
  • set fragment(value: string | null): void
  • Fragment part of the uri (url encoded).

    const uri = new Uri('http://fakedomain.com/path');
    uri.fragment = 'test';
    uri.toString(); // http://fakedomain.com/path/#test
    // or
    uri.fragment = '#test';
    uri.toString(); // http://fakedomain.com/path/#test

    Returns string | null

  • Fragment part of the uri (url encoded).

    const uri = new Uri('http://fakedomain.com/path');
    uri.fragment = 'test';
    uri.toString(); // http://fakedomain.com/path/#test
    // or
    uri.fragment = '#test';
    uri.toString(); // http://fakedomain.com/path/#test

    Parameters

    • value: string | null

    Returns void

path

  • get path(): string
  • set path(value: string): void

relativeUri

  • get relativeUri(): string

Methods

toString

  • toString(): string

Generated using TypeDoc