Build a fully-qualified URL from a path and optional query parameters.
Optionalquery: QueryParamsThe request as an answer error names it: <METHOD> <url> of the request the engine sends
for path + query (a GET, or the form POST of a long query, whose URL is the bare path),
userinfo redacted and cut at MAX_MESSAGE_VALUE_LENGTH characters. Every error about an
answer (bad JSON, an unknown charset, an inexact number, the wrong shape) starts with it,
as a network error does, so a caller making several requests can tell which one it was.
Optionalquery: QueryParamsThe error for an ArcGIS "HTTP 200 + error" envelope (a bad where, "Token
Required"): a LadesaeulenApiError with arcgisCode set, naming the request the
engine sent for path + query (URL redacted), with the server text stripped of
control characters and of the base URL's credentials.
Request a path with query params and parse the JSON reply into T. A number in it that
JSON.parse can't carry exactly (firstInexactNumber) is a LadesaeulenParseError; the number
of a member named in bigIntegerKeys is delivered as its exact literal, a string.
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: QueryParamsA value from an answer quoted for an error message (quoteValue), the base URL's credentials
scrubbed first, before the cut: a 2xx answer (a shape the client refuses) can echo them as
well as an error body. API code quotes server values with this.
Perform a request (GET, or a form POST for a long query — see requestTarget)
with Accept negotiation and transient-error retries. Redirects are NOT
followed — the canonical host answers directly, so a 3xx surfaces as an error.
Every transport is held to the same contract: the timeoutMs deadline and the
maxResponseBytes cap apply whatever it does, headers may be a record in any
case, a Headers object or a Map, the body any ArrayBuffer view, and anything
else it throws or returns is a LadesaeulenNetworkError. 429/503 statuses are
retried, and so is a GET whose connection was reset (see hasTransientCode); a
form POST is not re-sent after a reset, and no other network error is retried.
Optionalquery: QueryParamsDecide how a request goes out: a GET with the parameters in the query string,
or — when that URL would be longer than MAX_GET_URL_LENGTH — a POST to the
bare path with the same parameters as a form-encoded body.
Optionalquery: QueryParamstext without the base URL's credentials: server text (an error body that echoes the
request URL) and transport text (fetch's "Request cannot be constructed from a URL that
includes credentials:
EngineOptions.bigIntegerKeys, copied.