Get started with dio CDN

MIT licensed

Dio: Java-based Flutter HTTP client. Interceptors, form data, advanced features.

Tags:
  • vdom
  • virtual
  • dom
  • virtual dom
  • react
  • dio
  • framework
  • html
  • server
  • browser

Stable version

Copied!

How to start using dio CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with dio CDN - cdnhub.io</title>
    <script src="https://cdn.cdnhub.io/dio/9.1.1/dio.min.js"></script>
</head>
<body>
    <button id="fetchData">Fetch Data</button>

    <script>
        const dio = new Dio();

        document.getElementById('fetchData').addEventListener('click', async () => {
            try {
                const response = await dio.get('https://jsonplaceholder.typicode.com/todos/1');
                console.log(response.data);
            } catch (error) {
                console.error(error);
            }
        });
    </script>
</body>
</html>

All versions