-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (36 loc) · 835 Bytes
/
index.html
File metadata and controls
42 lines (36 loc) · 835 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button id="btn">click</button>
<script>
window.onload = function () {
let url = "http://localhost:9999/test.php",
data = {name: "txm"};
http.setConfig({
header: {
"Content-type": "application/x-www-form-urlencoded"
},
})
http.before({
fulfilled(config) {
console.log(config)
return config
}
})
http.after({
fulfilled(res) {
console.log('this is response middleware' )
return res
}
})
http.get(url, data).then(res => {
console.log(res)
})
}
</script>
</body>
</html>