-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (25 loc) · 660 Bytes
/
index.js
File metadata and controls
33 lines (25 loc) · 660 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
var http = require("https");
/*
Get your SMSLink / SMS Gateway Connection ID and Password from
https://www.smslink.ro/get-api-key/
*/
var options = {
"method": "GET",
"hostname": "secure.smslink.ro",
"port": null,
"path": "/sms/gateway/communicate/index.php?connection_id=MyConnectionID&password=MyConnectionPassword&to=07xyzzzzzz&message=MyMessage",
"headers": {
"useQueryString": true
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();