GET a JSON body without credentials (helloworld/whoami), checked against shape.
POST form-encoded params (with credential headers) and parse the JSON reply, which
must have the GENESIS envelope unless shape says otherwise.
POST helloworld/logincheck and evaluate the answer (loginVerdict, P18): resolves
only when GENESIS confirms the login. Rejected credentials — live an HTTP 200 whose
Status is an error text, the token echoed as Username — reject with a
RegionalstatistikApiError whose loginRejected (and so isAuthError) is true; an answer
that confirms nothing is a RegionalstatistikParseError. The 401/404 auth answers and the
transport errors keep their usual mapping.
POST form-encoded params and return the raw bytes (file / binary downloads).
A data/*file endpoint answers with a file (a ZIP wrapper), so a JSON or
empty reply is never a download: it is a GENESIS status the server sent
instead of the file (a credential, "too large" or "no such object" reply),
and handing it back would let a caller save {"Status":…} as x.zip.
RegionalstatistikParseError;Type), and otherwise a RegionalstatistikApiError
with that status — including 104 ("keine Objekte"), which for a download
means "no such object" (isNotFound, exit 4 in the CLI);RegionalstatistikParseError.
A body counts as JSON when its Content-Type says so or it starts with {
(after an optional UTF-8 BOM), whatever the Content-Type claims.
Build a fully-qualified URL from a path (parameters travel in the body).