GuidesTypeScript API ReferencePython v2 API Reference

UrlBuilder | @here/olp-sdk-ts

UrlBuilder | @here/olp-sdk-ts
Options
All
  • Public
  • Public/Protected
  • All
Menu

Helper class that builds URLs from a baseUrl and given query parameters

Hierarchy

  • UrlBuilder

Index

Constructors

  • new UrlBuilder(url: string, hasQuery?: boolean): UrlBuilder

Properties

hasQuery: boolean = false
url: string

Methods

  • appendQuery(key: string, value?: string | number | boolean | string[] | number[], operator?: string): void
  • Appends a query parameter to the URL, either using '&key=value' or '?key=value' depending on the hasQuery parameter.

    Escapes all strings using encodeURIComponent.

    String arrays are concatenated using commas.

    Parameters

    • key: string

      The key of the query parameter.

    • Optional value: string | number | boolean | string[] | number[]

      The value of the query parameter.

    • operator: string = "="

    Returns void

  • stringifyQuery(values: {}): string
  • toString(param: string | number): string

Legend

  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Namespace
  • Variable
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Static method

Settings

Theme

Generated using TypeDoc