Skip to content

Instantly share code, notes, and snippets.

@manuquentin
Last active December 20, 2015 00:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save manuquentin/6042783 to your computer and use it in GitHub Desktop.
Save manuquentin/6042783 to your computer and use it in GitHub Desktop.
function sendSMS(cb){
var sendSMSOptions = {
hostname: 'api.ninja.is',
path: '/my-SMS-web-hook',
method: 'POST',
headers: {accept: 'text/plain'}
};
req = http.request(sendSMSOptions, function(res){
res.on('end', function () {
cb();
});
res.on('error', function(err){
cb(err);
})
})
.on('error', function(e) {
cb(e);
});
req.end();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment