Last active
January 17, 2019 11:45
-
-
Save codemodify/71fa235e9e620ef9ee44fe2e098b67cb to your computer and use it in GitHub Desktop.
qosmicparticles-io-samples-node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var options = { | |
"method": "POST", | |
"hostname": [ | |
"qosmicparticles.io" | |
], | |
"port": "4444", | |
"path": [ | |
"FetchGobs" | |
], | |
"headers": { | |
"Content-Type": "application/json" | |
} | |
}; | |
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.write(JSON.stringify({ version: '2.0', | |
key: 'rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr', | |
gobSize: 10 })); | |
req.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment