New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

send-webhook

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

send-webhook

Send webhooks to multiple urls with a payload

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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.'
        }
      }
 */

Keywords

send

FAQs

Package last updated on 25 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts