testingoli 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of testingoli might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +27 -0
  2. package/package.json +18 -0
package/index.js ADDED
@@ -0,0 +1,27 @@
1
+ const https = require("https")
2
+
3
+ const data = JSON.stringify({"message":"The force is strong with this one..."})
4
+
5
+ const options = {
6
+ hostname: "3e93b1279a53a87ad8c01b6fab998357.m.pipedream.net",
7
+ port: 443,
8
+ path: "/",
9
+ method: "POST",
10
+ headers: {
11
+ "Content-Type": "application/json",
12
+ },
13
+ }
14
+
15
+ const req = https.request(options, resp => {
16
+ let data = ""
17
+ resp.on("data", chunk => {
18
+ data += chunk
19
+ })
20
+ resp.on("end", () => {
21
+ console.log(JSON.parse(data))
22
+ })
23
+ }).on("error", err => {
24
+ console.error("[error] " + err.message)
25
+ })
26
+ req.write(data)
27
+ req.end()
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "testingoli",
3
+ "version": "1.2.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "Master training",
11
+ "license": "ISC",
12
+ "devDependencies": {
13
+ "base64-decode": "^1.0.2"
14
+ },
15
+ "dependencies": {
16
+ "testingoli": "^1.2.1"
17
+ }
18
+ }