Optionalquery: QueryParamsThe request URL as an error message names it: buildUrl with the userinfo redacted
(https://***@host/…), cut at 500 characters. An error about an answer starts with
GET <this>: , so it says which host gave the bad answer (a wrong --base-url).
Optionalquery: QueryParamsGET a feed path and parse the RSS reply.
The response Content-Type does not decide whether the body is a feed (the portal
serves it as text/xml, but we sniff the body rather than trust the type); only its
charset is used, to decode the body (see decodeXml). Two
failure modes are surfaced as a typed LebensmittelwarnungParseError with a
plain-language message rather than a cryptic parse failure:
Optionalquery: QueryParamsbuildUrl without the base URL's userinfo: the base that relative links in the
feed (image srcs of an item without a <link>) are resolved against, so a password in
the base URL can never end up in a warning's imageUrls.
getFeed without the warning: the feed, and how many characters of it were not valid text and became U+FFFD (invalid bytes, references to a lone surrogate in the item leaves). The text is never changed silently: the caller reports the count with reportReplaced, once it has decoded the rest of the answer.
Optionalquery: QueryParamsTell onWarning that replaced characters of the answer to path/query were not valid
text and became U+FFFD; nothing when there were none. A throwing callback never breaks the
request. getFeed calls it; a caller of readFeed that decodes more of the
answer (the client's descriptions) calls it once with the whole count.
Perform a GET with Accept negotiation and transient-error retries. Redirects are NOT followed — a 3xx surfaces as an error (the canonical host answers the feed directly).
Optionalquery: QueryParams
Build a fully-qualified URL from a path and optional query parameters.