Created
March 17, 2016 03:16
-
-
Save matthova/fceac6fb48de2f88eb3e to your computer and use it in GitHub Desktop.
Posting to Smoothie board with node request library
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
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1 :)