Files
JS/02_advanced/uebungen/u23_fetch-users/index.html
Philippe Torrel cc3dc382ed
2026-07-07 14:35:23 +02:00

31 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Übung 23: Fetch API Einfache Datenabfrage</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<main>
<div class="container py-5">
<div class="alert alert-primary">
<h2>Übung 23: Fetch API Einfache Datenabfrage</h2>
<p>
Erstelle eine Funktion <code>fetchUsers</code>, die mithilfe der Fetch API eine Liste von Benutzern von der
DummyJSON-API abruft. Verwende async/await und try/catch, um Netzwerkfehler abzufangen. Die abgerufenen
Daten sollen dann in der Konsole ausgegeben werden.
</p>
<p>
<strong>Hinweis:</strong> Verwende die URL
<a href="https://dummyjson.com/users">https://dummyjson.com/users</a> für den Fetch-Aufruf.
</p>
</div>
</div>
</main>
<script>
'use strict';
</script>
</body>
</html>