NAME
    Message::Passing::Output::WebHooks - call 'WebHooks' with messages.

SYNOPSIS
        message-pass_webhooks --input STDIN

        You type:
        {"url": "http://localhost:5000/test","@type":"WebHooks","data":{"foo":"bar"}}

        Causes:

        POST /test HTTP/1.1
        Host: localhost:5000
        Content-Length: 13
        Content-Type application/json

        {"foo":"bar"}

WHAT IS A WEBHOOK
    A web-hook is an a notification method used by APIs.

    The idea is that you (as a client) define a URI on your website which is
    called when a certain action happens at your API provider. Some data
    relevant to the event is serialized out to you, allowing you to take
    action.

    The canonical example is Paypal's IPN system, in which Paypal make a
    call to your online payment system to verify that a payment has been
    made.

    See the "SEE ALSO" section below for other examples.

DESCRIPTION
    This class expects to have it's consume method called with a has of
    parameters, including:

    @url
        The URL to make the request to.

    data
        The data to serialize out to the HTTP post request

USAGE
    As a Message::Passing component, input is easy - if you're writing
    asynchronous perl code already, you can use the
    Message::Passing::Output::WebHooks class directly in your perl code, or
    you can use Log::Dispatch::Message::Passing to divert your application
    logs into it via the Log::Dispatch framework.

    If you're not already an AnyEvent perl app (most people!), then you can
    use Message::Passing::Input::STDIN, Message::Passing::Input::ZeroMQ or
    any other input class, and the command line message-pass utility
    supplied to run a worker process, then send messages to it.

    To send messages, you can either use Java or Ruby logstash
    <http://logstash.net/>, or if you're in perl, then it's entirely
    possible to use the ZeroMQ output component,
    Message::Passing::Output::ZeroMQ from within a normal perl application
    (via Log::Dispatch::Message::Passing or directly).

METHODS
  consume
    Generates and sends the post request from the message passed.

SEE ALSO
    Message::Passing
    <http://logstash.net>
    <http://wiki.shopify.com/WebHook>

AUTHOR
    Tomas (t0m) Doran <bobtfish@bobtfish.net>

SPONSORSHIP
    This module exists due to the wonderful people at Suretec Systems Ltd.
    <http://www.suretecsystems.com/> who sponsored it's development for its
    VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with
    the SureVoIP API -
    <http://www.surevoip.co.uk/support/wiki/api_documentation>

COPYRIGHT
    Copyright Suretec Systems 2012.

LICENSE
    GNU Affero General Public License, Version 3

    If you feel this is too restrictive to be able to use this software,
    please talk to us as we'd be willing to consider re-licensing under less
    restrictive terms.

