Skip to main content
100%

Loading data with fetch

✓ Published0🌍 Public
MMark Hanly
Last edited Sep 26, 2023
Created on Sep 26, 2023
Forked from HTML Starter

This example demonstrates how to load and read external data using the browser’s native Fetch API within a plain HTML page. It defines an asynchronous function, `fetchText`, that fetches a URL and returns the response as text. The code then applies this function to a CSV file containing named CSS colors from a GitHub gist, and logs the resulting text to the console. The example is minimal, focusing solely on the data-loading step with no visualization or rendering yet.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes