Build a fully-qualified URL from a path and optional query parameters.
The base URL is decomposed via the WHATWG URL parser rather than blindly
concatenated. The constructor has already checked it (validateBaseUrl); the
checks here are defence in depth and would fail as a DwdNetworkError — e.g.
instead of promoting an internal path segment to the hostname, or emitting a
double-?.
The base's own path prefix (such as the static bucket's
/app-prod-static.warnwetter.de) is preserved.
Optionalquery: QueryParamsThe request URL as error messages show it: absolute (so a message names the host that gave a bad answer, which matters with two hosts and a custom base URL), userinfo redacted and cut at MAX_QUOTED_LENGTH characters. It never throws: describing a URL for a message does not validate it (buildUrl does).
Optionalquery: QueryParamsPerform a GET expecting JSON and parse it into T. Every error about the answer names the
request, GET <url>: … (userinfo redacted), so a message says which of the two hosts sent
the bad answer.
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.
Optionalquery: QueryParamsPerform a request with Accept negotiation and transient-error retries.
EngineOptions.bigIntegerKeys, copied.