fetch() treats network as promises with explicit control

A checkout page must read product data without freezing the interface while waiting.

I call fetch with a URL and options, then handle the promised Response asynchronously.

MDN documents fetch as promise based requests resolving on headers, even for error statuses.

Method, body, and headers travel in the init object, so each request stays explicit.

Error statuses resolve rather than reject, which forces callers to inspect Response.ok themselves.

If DOM turns documents into scriptable objects renders the result, History API restores back button behavior in SPAs pairs each fetch with navigation.

I wrap every fetch with status checks before trusting its body content.