Options
All
  • Public
  • Public/Protected
  • All
Menu

Class URLQuery

Package version

A class that handles the query portion of a URLBuilder.

Hierarchy

  • URLQuery

Index

Methods

any

  • any(): boolean
  • Get whether or not there any query parameters in this URLQuery.

    Returns boolean

get

  • get(parameterName: string): string | string[] | undefined
  • Get the value of the query parameter with the provided name. If no parameter exists with the provided parameter name, then undefined will be returned.

    Parameters

    • parameterName: string

    Returns string | string[] | undefined

keys

  • keys(): string[]
  • Get the keys of the query string.

    Returns string[]

set

  • set(parameterName: string, parameterValue: any): void
  • Set a query parameter with the provided name and value. If the parameterValue is undefined or empty, then this will attempt to remove an existing query parameter with the provided parameterName.

    Parameters

    • parameterName: string
    • parameterValue: any

    Returns void

toString

  • toString(): string
  • Get the string representation of this query. The return value will not start with a "?".

    Returns string

Static parse

  • Parse a URLQuery from the provided text.

    Parameters

    • text: string

    Returns URLQuery

Generated using TypeDoc