Skip to content

Instantly share code, notes, and snippets.

@okisanjp
Created April 28, 2014 06:47
Show Gist options
  • Save okisanjp/11363552 to your computer and use it in GitHub Desktop.
Save okisanjp/11363552 to your computer and use it in GitHub Desktop.
Node.js + npm.request -> Leftronic Sparkgraph
var request = require('request');
var data = {
"accessKey": "ACCESSKEY",
"streamName": "test_sparkline",
"point": [{
"number": 40,
"timestamp": Math.floor((new Date)/1000)
}]
}
request.post({
uri: 'https://www.leftronic.com/customSend',
body: data,
json: true
},
function(err, result, body) {
console.log(err || body);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment