-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
78 lines (73 loc) · 2.98 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
fetch("https://services-dev.ultainc.com/innovation/api/v1/subscribe", {
method: 'POST',
// mode: 'cors',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'vTAdVJMYpGfUAZmIT73p4NKAxw6Gyopf'
},
body: JSON.stringify({
"email": "[email protected]",
"campaign": "nft"
})
})
.then((response) => response.json())
.then((data) => console.log(data));
fetch("https://us-central1-ulta-innovation-sandbox.cloudfunctions.net/function-1", {
method: 'POST',
// mode: 'cors',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'vTAdVJMYpGfUAZmIT73p4NKAxw6Gyopf'
},
body: JSON.stringify({
"email": "[email protected]",
"campaign": "nft"
})
})
.then((response) => response.json())
.then((data) => console.log(data));
// fetch("https://ulta-innovation-sandbox.uc.r.appspot.com/v1/api/template/values", {
// method: 'POST', // *GET, POST, PUT, DELETE, etc.
// mode: 'cors', // no-cors, *cors, same-origin
// // cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached
// // credentials: 'same-origin', // include, *same-origin, omit
// headers: {
// 'Content-Type': 'application/json',
// 'x-api-key': 'vTAdVJMYpGfUAZmIT73p4NKAxw6Gyopf'
// // 'Content-Type': 'application/x-www-form-urlencoded',
// },
// // redirect: 'follow', // manual, *follow, error
// // referrerPolicy: 'no-referrer', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
// body: JSON.stringify({
// "email": "[email protected]",
// "campaign": "nft"
// }) // body data type must match "Content-Type" header
// })
// .then((response) => response.json())
// .then((data) => console.log(data));
// fetch("https://glamlab-api-sb.ultainc.com/innovation/api/v1/subscribe", {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// 'x-api-key': 'AIzaSyCmTDgR5Z95n8efyM5RQd3pvonJnodbln4'
// },
// body: JSON.stringify({
// "email": "[email protected]",
// "campaign": "nft"
// })
// })
// .then((response) => response.json())
// .then((data) => console.log(data));
</script>
</body>
</html>