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

    Class RequestEngine

    Index
    bigIntegerKeys: ReadonlySet<string>

    EngineOptions.bigIntegerKeys, copied.

    • Build a fully-qualified URL from a path (on the data host) and optional query. The result carries the base URL's userinfo, if any: it is the URL a transport requests.

      Parameters

      Returns string

    • GET a fully-qualified absolute URL (e.g. the catalogue host) and parse JSON into T.

      Type Parameters

      • T

      Parameters

      Returns Promise<T>

    • getJsonAbsolute, plus the decoded text and the request, as getJsonAnswer gives them.

      Type Parameters

      • T

      Parameters

      Returns Promise<JsonAnswer<T>>

    • getJson, plus the decoded text the value was parsed from (the client keeps it as the body of the ArcGIS error envelope, as sent: rebuilding it with JSON.stringify overflowed the stack on Node 22 and 24 for an envelope nested 10,000 deep) and the request as an error about the answer names it (GET <url>, redacted and shortened).

      Type Parameters

      • T

      Parameters

      Returns Promise<JsonAnswer<T>>

    • A value from an answer quoted for an error message or a note (quoteValue, cut at max), the base and catalogue URLs' credentials scrubbed first, before the cut: a 2xx answer (a value a row can't read, a field name or key a number error names) can echo them as well as an error body. API code quotes server values with this.

      Parameters

      • value: string
      • Optionalmax: number

      Returns string

    • text without the credentials of the base URL or of any absolute URL this engine requested (the catalogue): server text (an error body that echoes the request URL) and transport text (fetch's "Failed to fetch ") can carry them. The client uses it for the errors it builds itself (the ArcGIS envelope).

      Parameters

      • text: string

      Returns string

    • An answer's text, already scrubbed as sent (redact), as RegionalatlasApiError.body keeps it: when it is JSON with an escape in it, checked decoded too. An escape (\", \u00e4) hides an echoed credential from the scrub of the text as sent, while a caller who parses the body sees it. Such a body is kept as the decoded JSON written again (JSON.stringify, one spelling per character) with the credential scrubbed in that spelling. A body that doesn't parse is text nobody decodes, and stays as sent; one too deeply nested to write again is left out (""). The client uses it for the ArcGIS envelope on HTTP 200 too.

      Parameters

      • scrubbed: string

      Returns string