Hierarchy

  • Requests

Constructors

Properties

Methods

Constructors

Properties

SOCKET_TIMEOUT: number = 300000

Methods

  • Internal

    Sends an HTTP DELETE request to the input URL.

    Parameters

    • url: string

      The URL to send the request to.

    • Optional opts: ReqOptions

      The options that will be used in the request. (Optional)

    Returns Promise<Response>

  • Internal

    Sends an HTTP GET request to the input URL.

    Parameters

    • url: string

      The URL to send the request to.

    • Optional opts: ReqOptions

      The options that will be used in the request. (Optional)

    Returns Promise<Response>

  • Internal

    Sends an HTTP POST request to the input URL.

    Parameters

    • url: string

      The URL to send the request to.

    • Optional opts: ReqOptions

      The options that will be used in the request. (Optional)

    Returns Promise<Response>

  • Internal

    Pings a Minecraft server asynchronously and returns a raw object with server data. Should not be called when running outside of a Node process.

    Used internally to create a new Server instance.

    const server = new Server(data, host, port)
    console.log(server.players)

    Parameters

    • pingParams: PingParams

    Returns Promise<PingedServer | OnlineServer>