Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpClient

A static helper class used to provide an interface for Promise based web requests.

Hierarchy

  • HttpClient

Index

Methods

Static get

  • Makes a GET request to the specified path.

    Parameters

    • path: string

      The path to make the GET request to.

    • Default value options: RequestOptions = { query: {}, proxy: null }

      The options to use while making the request.

    Returns Promise<string>

Static Private getWithProxy

  • getWithProxy(endpoint: Url, proxy: Proxy, query: string): Promise<any>

Static post

  • post(path: string, params?: object): Promise<string>
  • Makes a POST request to the specified path and passes the provided parameters.

    Parameters

    • path: string

      The path to make the POST request to.

    • Optional params: object

      The POST parameters to include.

      • [id: string]: any

    Returns Promise<string>

Static unzip

  • unzip(zipped: IncomingMessage): Promise<string>
  • Unzips a gzipped HTTP response.

    Parameters

    • zipped: IncomingMessage

      The gzipped response to unzip.

    Returns Promise<string>

Generated using TypeDoc