@maschinenlesbar.org/lebensmittelwarnung-cli
    Preparing search index...

    Class RequestEngine

    Index
    • GET a feed path and parse the RSS reply.

      The response Content-Type is intentionally ignored (the portal serves the feed as text/xml, but we sniff the body rather than trust the header). Two failure modes are surfaced as a typed LebensmittelwarnungParseError with a plain-language message rather than a cryptic parse failure:

      • an HTML shell (the feed moved, or a proxy returned the website); and
      • an EMPTY body — which is exactly what the DEFUNCT legacy JSON API returns (HTTP 200 + Content-Length: 0 since the portal relaunch), so the hint names it explicitly.

      Parameters

      Returns Promise<RssFeed>

    • 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).

      Parameters

      • path: string
      • Optionalquery: QueryParams
      • accept: string = "application/rss+xml, application/xml"

      Returns Promise<RawResponse>