Apps can load the bundled HTTP module and request public data while rendering:
Choose a sensible cache lifetime
Set ttl_seconds based on how quickly the source changes and how often users need a new frame. Caching reduces latency, avoids unnecessary upstream traffic, and helps protect an app from short outages.
Design a fallback
Prefer this order when an upstream request fails:
- reuse safe cached data;
- show a clear stale or unavailable state;
- log a concise diagnostic without user data; and
- call
fail() only for a permanent condition that prevents any useful frame.
Hosted network policy
Approved apps run with network isolation. Private, loopback, link-local, metadata, internal service, and non-approved destinations are blocked. Redirects and DNS results are checked again before a request is allowed.
Before publishing, confirm that the external service permits your use, display, caching, and expected request volume. An open-source client library does not grant rights to a third-party API or its data.