-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-page.html
42 lines (38 loc) · 1.25 KB
/
test-page.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- <meta http-equiv="refresh" content="5;url=http://www.naver.com/"> -->
<title>Document</title>
</head>
<body>
<script>
let req = new XMLHttpRequest();
req.open('POST', 'https://openapi.naver.com/v1/datalab/search');
req.setRequestHeader('Access-Control-Allow-Origin', '*');
req.setRequestHeader('Content-Type', 'application/json');
req.setRequestHeader('X-Naver-Client-Id', '9bQxi6RNQGf3G3PEknHS');
req.setRequestHeader('X-Naver-Client-Secret', 'YOX5qCK8mz');
// req.setRequestHeader('Content-Length','360');
var body = {
"startDate": "2018-12-01",
"endDate": "2019-01-01",
"timeUnit": "month",
"keywordGroups": [
{
"groupName": "한글",
"keywords": [
"알함브라"
]
}
]
};
req.send(body);
if (req.status == 200) {
alert(req.responseText);
}
</script>
</body>
</html>