-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (43 loc) · 1.29 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
<html>
<header>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular.min.js"></script>
</header>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
{{ aaa }}
<input type="button" ng-click="clickpost()" name="click" value="clicks">
</div>
<script>
var app = angular.module("myApp", []);
app.controller("myCtrl", function($scope, $http) {
var access_token = '';
var headerx = {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization' : access_token
};
var messages = {
'type': 'text',
'text': '1k'
};
var url = 'https://api.line.me/v2/bot/message/push';
var data = {
'to': 'U83670cc497f32dcba4e722be89893a6e',
'messages': messages
};
$scope.clickpost = function() {
$http({
method: 'POST',
url: url ,
data: data ,
headers: headerx
}).then(function successCallback(response) {
console.log('successCallback');
}, function errorCallback(response) {
console.log('error');
});
}
$scope.aaa = 'start Line x'
});
</script>
</body>
</html>