-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
57 lines (52 loc) · 1.59 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!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>