-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (24 loc) · 1.02 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png" />
<title>Keap Signup</title>
<script>
// this sample code is just to demo how to connect to the API. You may use any module that you prefer.
// your code should handle successful or unsuccessful responses from the API
// all three fields are required, and an invalid email address will fail ([email protected] will also fail)
const xhr = new XMLHttpRequest();
xhr.open('POST', 'https://keap.com/api/project/leads');
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onload = () => {
console.log(JSON.parse(xhr.response));
};
const params = 'param1=a¶m2=b';
xhr.send(params);
</script>
</head>
<body>
</body>
</html>