Last active
February 22, 2016 21:06
-
-
Save jdcauley/ebb1c55da1e355748e06 to your computer and use it in GitHub Desktop.
Gist for use with Hook.io
This file contains hidden or 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
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