GithubHelp home page GithubHelp logo

webhook-relay's Introduction

webhook-relay
=============

    Status: Highly experimental, not actively maintained

A Node.js server for forwarding webhook requests in a non-blocking
manner.

http://www.webhooks.org/ are brilliant, but implementing them as a 
provider is a little tricky as your application has to make HTTP 
request to arbitrary endpoints when specific actions occur. If there 
are many of those endpoints and some of them are slow to respond, 
this could degrade the performance of your application.

A common solution to this problem is to place outgoing webhook 
requests in a queue. webhook-relay is a self-contained queue and 
response sending agent. You send it an HTTP POST describing the 
webhook request that needs to be sent, it replies instantly with 
an "OK", and the request itself is sent off shortly afterwards.

webhook-relay should respond within a few ms, so your main 
application can safely block on the call to webhook-relay.

webhook-relay also tracks statistics on the number of calls it 
has made successfully.

Installation:

    git clone git://github.com/simonw/webhook-relay.git
    cd webhook-relay
    # Pull in dependencies: djangode and restler
    git submodule init
    git submodule update
    
    # Run the server:
    node webhook-restler.js

Usage from Python:

    import urllib, json
    
    urllib.urlopen(
        'http://localhost:8056/relay/', urllib.urlencode({
            'url': 'http://www.postbin.org/13lam6a',
            'data': json.dumps({'foo': 'bar', 'baz': 'bwaf'})
        })
    ).read()

Then visit http://www.postbin.org/13lam6a to see what was posted. You can 
also visit http://localhost:8056/ to see basic webhook-relay statistics.

webhook-relay's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

joelvh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.