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

    Class RequestEngine

    Index
    bigIntegerKeys: ReadonlySet<string>

    EngineOptions.bigIntegerKeys, copied.

    • Build a fully-qualified URL from a path and optional query parameters. It keeps the base URL's userinfo; request() sends the URL without it and the userinfo as an Authorization header instead.

      Parameters

      Returns string

    • The request URL as error messages show it: absolute (so a message names the host that gave a bad answer, which matters with a custom base URL), userinfo redacted and cut at MAX_MESSAGE_VALUE_LENGTH (500) characters. It never throws.

      Parameters

      Returns string

    • Perform a GET expecting JSON and parse it into T. A number JSON.parse cannot carry exactly (out of a double's range, past 2^53 and printed differently, non-zero and too small, or a subnormal that prints changed) is a TagesschauParseError, never a changed value; so is an empty (or whitespace-only) body. Every error about the answer names the request (GET <url>: …, userinfo redacted).

      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>