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

    Class RequestEngine

    Index
    bigIntegerKeys: ReadonlySet<string>

    EngineOptions.bigIntegerKeys, copied.

    • The URL of a request for path (and query) as error messages show it: absolute, userinfo redacted, cut at 500 characters. The client's own errors about an answer start with GET <this>: , like the engine's, so a message names the host that gave a bad answer.

      Parameters

      Returns string

    • Perform a GET expecting JSON and parse it into T. The body is decoded by the charset its Content-Type names (UTF-8 when it names none; see decodeBody). An empty (or whitespace-only) body is a ReiseParseError: every endpoint answers with a JSON document. Every error about the answer names the request (GET <url>: …, userinfo redacted).

      The text is never changed silently: bytes that are not valid in the charset, and lone surrogates written as JSON escapes (\ud800), are replaced with U+FFFD, so the result is well-formed text (jq rejects a lone surrogate, and with it the whole output), and onWarning is told how many. One bad character never sinks a whole answer.

      Type Parameters

      • T

      Parameters

      Returns Promise<T>

    • Server text the client's own messages quote — an error envelope sent with a 2xx status, a country name, a malformed flag value — the base URL's credentials scrubbed first (a 2xx answer is decoded JSON, which no other scrub sees), then made safe and short by serverTextForMessage. API code quotes server values with this.

      Parameters

      • value: string

      Returns string