Build a fully-qualified URL from a path and optional query parameters.
Optionalquery: QueryParamsThe request URL as error messages show it: absolute (so a message names the host that gave a bad answer, which matters with a mirror as the base URL), userinfo redacted and cut at MAX_MESSAGE_VALUE_LENGTH characters.
Optionalquery: QueryParamsPerform a GET expecting JSON and parse it into T. An empty (or whitespace-only) body is a
HochwasserzentralenParseError: every endpoint answers with a JSON document. Every error about
the answer names the request (GET <url>: …, userinfo redacted), so with a mirror as the
base URL it says which host sent it.
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 GET with Accept/Accept-Language negotiation and transient-error retries. Redirects are NOT followed — a 3xx surfaces as an error.
Optionalquery: QueryParamstext without the base URL's credentials: server text (an error body that echoes the
request URL) and transport text (fetch's "Failed to fetch
EngineOptions.bigIntegerKeys, copied.