Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zackurben/26935adf8c654ec821f1 to your computer and use it in GitHub Desktop.
Save zackurben/26935adf8c654ec821f1 to your computer and use it in GitHub Desktop.
var request = require('request');
request(
{
url: 'https://{projectname}.form.io/api/{resourcename}',
method: 'POST',
headers: {
'x-jwt-token': token
},
form: {
{fieldname1}: value1,
{fieldname2}: value2
}
}
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment