API Core - v2.4.1
    Preparing search index...

    Function mockHttpResponse

    • The transport envelope a mocked HttpClient.request resolves with: { data, headers, status }, the core's HttpResponse<T>. One helper for every suite that spies on the transport — the two SDKs and one of this package's own suites each kept a byte-identical copy.

      Type Parameters

      • T

      Parameters

      • data: T

        The parsed body the transport would return.

      • headers: Record<string, string | string[]> = {}

        Response headers (defaults to none).

      • status: number = HTTP_OK

        Response status (defaults to 200).

      Returns HttpResponse<T>

      The envelope, typed as the transport's own.