Created
April 28, 2014 06:47
-
-
Save okisanjp/11363552 to your computer and use it in GitHub Desktop.
Node.js + npm.request -> Leftronic Sparkgraph
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 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