Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Request

HTTP/S request handler, promisify request callbacks

Hierarchy

  • Request

Index

Methods

Methods

get

  • get(url: string, data?: any, options?: client.CoreOptions & client.Options): Promise<any>
  • GET request handler, adds data to query string with default options

    Parameters

    • url: string
    • Optional data: any
    • Optional options: client.CoreOptions & client.Options

    Returns Promise<any>

make

  • make(opts: client.CoreOptions & client.OptionsWithUri): Promise<any>
  • Create a custom request, with method and other options in Node requests. Note, requests do not throw or need catching, to avoid a common occurrence that would crash the bot. Instead they log errors and return undefined.

    Parameters

    • opts: client.CoreOptions & client.OptionsWithUri

    Returns Promise<any>

post

  • post(url: string, data?: object, options?: client.CoreOptions & client.Options): Promise<any>
  • POST request handler, adds data to body with default options

    Parameters

    • url: string
    • Default value data: object = {}
    • Optional options: client.CoreOptions & client.Options

    Returns Promise<any>

Generated using TypeDoc