1.0.0 • Published 7 years ago

send-webhook v1.0.0

Weekly downloads
17
License
ISC
Repository
github
Last release
7 years ago

send-webhook

NPM

const webhook = require('send-webhook');

const URLS = [
  'http://example.com/webook_reciever',
  'http://johndoe.com/webhook',
  'http://incoming.com/recieve'
];

const payload = {
  // This can be anything you want to send.
  status: true,
  data: {
    message: 'This is a sample web-hook that will be sent via POST.'
  }
};

/* 
  You can also do it to a single URL by just putting in a string
  instead of an array.
*/


webhook(URLS, payload, (error, status) => {
  if(error) console.error(error);
  console.log('Webhooks have been sent.');
});



/*
    URL: http://johndoe.com/webhook
    TYPE: POST
    MIME: application/json
    DATA:
      {
        status: true,
        data: {
          message: 'This is a sample web-hook that will be sent via POST.'
        }
      }
 */
1.0.0

7 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago