Class ClientRequest<Request, Response>Internal

Class representing a single request from the SockDaemonClient

Created by SockDaemonClient#request

Type Parameters

Hierarchy

  • ClientRequest

Constructors

  • Type Parameters

    Parameters

    • request: Request

      Request to be sent

    • signal: undefined | AbortSignal

      Signal to abort the request

    • onFinish: (() => void)

      Called on either success or failure

        • (): void
        • Called on either success or failure

          Returns void

    Returns ClientRequest<Request, Response>

Properties

#onAbort: ((er) => void)

Type declaration

    • (er): void
    • Parameters

      • er: any

      Returns void

#onFinish: (() => void)

Type declaration

    • (): void
    • Returns void

#reject?: ((er) => void)

Type declaration

    • (er): void
    • Parameters

      • er: any

      Returns void

#resolve?: ((r) => void)

Type declaration

    • (r): void
    • Parameters

      • r: Response

      Returns void

#signal?: AbortSignal
id: string

Message ID request/response

promise: Promise<Response>

Promise which resolves when the response is received

request: Request

The request sent to the Daemon

response?: Response

The response returned by the Daemon, if resolved

Methods

  • Cancel the request and fail the promise

    Parameters

    • er: any

    Returns void

  • Resolve the request with a response

    Parameters

    • r: Response

    Returns void

Generated using TypeDoc