http-postwebhookshttp-put

Webhook vs HTTP POST/PUT?


Webhook is said to be push style communication which enables an application to push data to another application.

With HTTP POST/PUT also we can send data to another application.

So how are two different at conceptual level?


Solution

  • They are the same thing. A webhook is a callback or event listener concept for the web that is implemented as an HTTP PUT or POST. It could be implemented as a GET if this information is small.

    To make it work, you register your webhook address with someone else's server. It could be an address like https://yourcompany.com/notifyme. Then that other server will send an HTTP PUT or POST request to the address you registered when some event occurs.

    I think this is confusing because the terms web and hook are so broad that they are almost meaningless. A hook is something a pirate replaces his missing hand with. The terms API callback or listener API would be much more intuitive.