@maschinenlesbar.org/mudab-cli
    Preparing search index...

    Class RequestEngine

    Index
    • Build a fully-qualified URL from a path (all parameters travel in the body).

      Parameters

      • path: string

      Returns string

    • POST a JSON payload and parse the JSON reply into T. Every MUDAB endpoint answers with a JSON document, so an empty body (or a 204) is a MudabParseError, not an empty result.

      Type Parameters

      • T

      Parameters

      • path: string
      • payload: unknown

      Returns Promise<T>

    • Perform a request with Accept negotiation and transient-error retries.

      Redirects are deliberately NOT followed: the canonical host answers directly, and following a cross-origin 3xx blindly is a footgun. A 3xx therefore surfaces as a MudabApiError naming the redirect target (location).

      Parameters

      • method: string
      • path: string
      • options: { accept: string; body?: Buffer<ArrayBufferLike> } = ...

      Returns Promise<RawResponse>

    • text without the base URL's credentials: server text (an error body that echoes the request URL, the Authorization header or the decoded user:password) and transport text (fetch's "Failed to fetch ") can carry them.

      Parameters

      • text: string

      Returns string