Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Last active February 22, 2016 21:06
Show Gist options
  • Save jdcauley/ebb1c55da1e355748e06 to your computer and use it in GitHub Desktop.
Save jdcauley/ebb1c55da1e355748e06 to your computer and use it in GitHub Desktop.
Gist for use with Hook.io
module['exports'] = function simpleHttpRequest (hook) {
// npm modules available, see: http://hook.io/modules
var request = require('request');
var options = {
uri: 'https://www.ourstate.com/?callback=gravityformsstripe',
method: 'POST',
json: hook.params
};
request(options, function (err, response, body) {
if (err) {
console.log(err);
console.log(response);
return hook.res.end(err.messsage);
}
hook.res.end(body);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment