-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (30 loc) · 905 Bytes
/
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
<html>
<head>
<title>Test Nano-Rest-File</title>
<script>
function tests() {
function request(type, uri, body) {
var req = new XMLHttpRequest();
req.open(type, uri, true);
req.onload = function() {
console.log("STATUS", req.status);
console.log(req.responseText);
}
req.send(body);
}
request("GET", "index.html", null);
request("GET", "nothere.html", null);
request("PUT", "createme.txt", "This content ends with dot.");
request("GET", "./", null);
request("DELETE", "createme.txt", null);
request("GET", ".git/", null);
request("POST", "newdir/", null);
request("GET", "./", null);
request("DELETE", "newdir/", null);
}
</script>
</head>
<body onload="tests()">
<h1>Test Nano-Rest-File</h1>
</body>
</html>