examples/web/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@tkrotoff/fetch Web example</title>
</head>
<body>
<p>Open the DevTools's console</p>
Tested with:
<ul>
<li>Chrome 108</li>
<li>Firefox 108</li>
<li>Safari 16.2</li>
<li>Edge 108</li>
</ul>
<p>
<button type="button" id="get200OKExample">get() 200 OK</button>
</p>
<p>
<button type="button" id="postJSON201CreatedExample">postJSON() 201 Created</button>
</p>
<p>
<button type="button" id="del200OKExample">del() 200 OK</button>
</p>
<p>
<button type="button" id="get404NotFoundExample">get() 404 Not Found</button>
</p>
<p>
<button type="button" id="get500InternalServerErrorExample">
getJSON() 500 Internal Server Error
</button>
</p>
<p>
<button type="button" id="getCorsBlockedExample">get() CORS blocked</button>
</p>
<p>
<input type="file" name="fileField" multiple />
<button type="button" id="uploadFilesExample">postJSON() upload files</button>
</p>
<p>
<button type="button" id="abortRequestExample">get() abort</button>
</p>
<p>
<button type="button" id="downloadProgressExample">get() progress</button>
<progress id="download-progress-indicator" value="0"></progress>
<!-- https://stackoverflow.com/a/53365710 -->
<img id="download-progress-img" alt="download-progress-img" src="data:," />
</p>
<script src="main.js"></script>
</body>
</html>