• A small wrapper that automatically asks for JSON with a Timeout

    Parameters

    • url: string

      The URL to make the Request to

    • data: Object = {}

      The data of the Request

    • Optionaloptions: { onTimeout?: Function; timeoutMs?: null | number } = {}

      Additional options

      • OptionalonTimeout?: Function

        A method to invoke if and when the timeout is reached

      • OptionaltimeoutMs?: null | number

        How long to wait for a Response before cleanly aborting. If null, no timeout is applied. Default: 30000.

    Returns Promise<any>