Skip to content

Instantly share code, notes, and snippets.

@codemodify
Last active January 17, 2019 11:45
Show Gist options
  • Save codemodify/71fa235e9e620ef9ee44fe2e098b67cb to your computer and use it in GitHub Desktop.
Save codemodify/71fa235e9e620ef9ee44fe2e098b67cb to your computer and use it in GitHub Desktop.
qosmicparticles-io-samples-node.js
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