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: {} }

      The options to use while making the request.

    Returns Promise<Buffer>

Static Private handleResponse

  • handleResponse(msg: IncomingMessage, writeStream?: Writable): Promise<Buffer>

Static post

  • post(path: string, params?: object, stream?: Writable): Promise<Buffer>
  • 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
    • Optional stream: Writable

    Returns Promise<Buffer>

Generated using TypeDoc