Build a fully-qualified URL from a path and optional query parameters.
Throws a FimValidationError for a path with a "." or ".." segment. The
resource methods put ids into the path with pathSegment (encodeURIComponent),
which leaves those two unchanged, and URL parsing then resolves them:
schemas get S1 .. would request /api/v1/schemas/ (the search) and print its
result with exit 0. Neither can name a resource. (Percent-encoded forms such as
"%2e%2e" are safe: encodeURIComponent turns their "%" into "%25".) An empty
segment (// or a trailing /) is rejected the same way; pathSegment
already refuses a blank id, so this is a backstop for future path builders.
Throws a FimValidationError for a blank query value, a blank array element, an
empty array or a blank parameter name (assertNonBlankParams): the API treats an
empty parameter as no filter, so name= would return the unfiltered result.
Every search, list and CSV method goes through here, so all are covered.
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 custom base URL), userinfo redacted and cut at MAX_MESSAGE_VALUE_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. With shape, the parsed value
must have the documented form (responseShapeProblem), or the call throws a
FimParseError: a null, {} or an error envelope answered with a 2xx would
otherwise be printed as data, or read as "nothing found". A number JSON.parse can't
carry exactly (firstInexactNumber: out of range, past 2^53, or too small and turned
into 0) is a FimParseError too, never a changed value.
Optionalquery: QueryParamsOptionalshape: ResponseShapePerform a GET returning the raw bytes (XML / PDF / CSV downloads). An HTML page answered with a 2xx (a maintenance or login page, a proxy's error page) is a FimParseError naming the request, not a download: no endpoint serves HTML, and the CLI would otherwise save it over the user's file with exit 0.
Optionalquery: QueryParamsPerform a request with Accept negotiation and transient-error retries.
EngineOptions.bigIntegerKeys, copied.