From 1ca2379c6b86c4ee09ded4db1dc47499cfb5acd6 Mon Sep 17 00:00:00 2001 From: tonnoz Date: Mon, 2 Sep 2019 15:23:42 +0200 Subject: [PATCH] added simple restClient to play with during workshop --- package.json | 3 ++- restmind.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 restmind.js diff --git a/package.json b/package.json index 6ab8e96..dced628 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "connect-sse": "^1.2.0", "express": "^4.17.1", "node-neurosky": "0.0.1", - "pubsub-js": "^1.7.0" + "pubsub-js": "^1.7.0", + "request": "^2.88.0" } } diff --git a/restmind.js b/restmind.js new file mode 100644 index 0000000..472b678 --- /dev/null +++ b/restmind.js @@ -0,0 +1,15 @@ +const request = require('request'); + +const options = { + url: '', + headers: { + + }, + method: 'POST' +}; + +function callback(error, response, body) { + console.log(JSON.stringify(body)); +} + +request(options, callback);