Skip to content

Instantly share code, notes, and snippets.

@matthova
Created March 17, 2016 03:16
Show Gist options
  • Save matthova/fceac6fb48de2f88eb3e to your computer and use it in GitHub Desktop.
Save matthova/fceac6fb48de2f88eb3e to your computer and use it in GitHub Desktop.
Posting to Smoothie board with node request library
const request = require(`request`);
// request.post('http://10.139.15.23/command', {form:{data:'G1 X2'}});
const params = {
method: 'POST',
uri: 'http://10.139.15.23/command',
formData: {
data: 'G1 X20',
},
json: true // Automatically stringifies the body to JSON
};
request(params);
@arthurwolf
Copy link

+1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment