Skip to content

Instantly share code, notes, and snippets.

@joelongstreet
Created November 13, 2016 17:46
Show Gist options
  • Save joelongstreet/a69bcf69f456a6c26f1956e3e297e902 to your computer and use it in GitHub Desktop.
Save joelongstreet/a69bcf69f456a6c26f1956e3e297e902 to your computer and use it in GitHub Desktop.
var url = [
'https://api.spark.io/v1/devices/',
'2d0056001551353531343431',
'/message'
].join('');
var postParams = [
'access_token=',
process.env.SPARK_CORE_TOKEN,
'&params=',
JSON.stringify({ a : true, b : { c : true }})
].join('');
needle.post(url, postParams, (err, res) => {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment