Build a fully-qualified URL from a path and optional query parameters. It keeps
the base URL's userinfo; request() leaves it out and sends it as an
Authorization header instead (see basicAuthorization).
Optionalquery: QueryParamsPerform a GET expecting JSON: the parsed value, the URL that answered (after any redirects,
userinfo redacted) and the request as an error message names it, GET <url> (cut at
MAX_MESSAGE_VALUE_LENGTH). Every error about the answer starts with that request
(GET <url>: the answer is not valid JSON.), so a log of a run over many portals tells which
one failed; the client prefixes its own envelope and shape errors with it too.
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 expecting JSON and parse it into T (see getAnswer).
Optionalquery: QueryParamsPerform a request with Accept negotiation and transient-error retries.
text without the base URL's credentials (raw and percent-decoded, and the forms a
server echoes them back in: echoedCredentialForms): server text
(an error body or a CKAN error that echoes the request URL) and transport text
(fetch's "Failed to fetch
EngineOptions.bigIntegerKeys, copied.