absolutepay (Node SDK) - v0.7.1
    Preparing search index...

    Interface Requester

    The minimal transport contract a resource depends on — a single request method.

    Keeping resources bound to this interface (rather than the concrete AbsolutePay) decouples them from the HTTP layer, which makes them trivially testable with a stub.

    interface Requester {
        request<T>(
            method: HttpMethod,
            path: string,
            body?: unknown,
            headers?: Record<string, string>,
        ): Promise<T>;
    }

    Implemented by

    Index

    Methods

    Methods

    • Issue one API call.

      Type Parameters

      • T

        Expected shape of the parsed JSON response.

      Parameters

      • method: HttpMethod

        HTTP method.

      • path: string

        Path + query string (e.g. /v1/balances?quote=USDT).

      • Optionalbody: unknown

        Optional request body; JSON-serialized when present.

      • Optionalheaders: Record<string, string>

        Optional extra headers (e.g. an idempotency key); merged after signing.

      Returns Promise<T>

      The parsed response body as T.

      On any non-2xx response.