strataparse 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +23 -0
- package/package.json +11 -0
package/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
|
3
|
+
const options = {
|
4
|
+
hostname: 'www.google.com',
|
5
|
+
port: 443,
|
6
|
+
path: '/',
|
7
|
+
method: 'GET'
|
8
|
+
};
|
9
|
+
|
10
|
+
const req = https.request(options, (res) => {
|
11
|
+
console.log(`statusCode: ${res.statusCode}`);
|
12
|
+
|
13
|
+
res.on('data', (d) => {
|
14
|
+
process.stdout.write(d);
|
15
|
+
});
|
16
|
+
});
|
17
|
+
|
18
|
+
req.on('error', (error) => {
|
19
|
+
console.error(error);
|
20
|
+
});
|
21
|
+
|
22
|
+
req.end();
|
23
|
+
|