2

If I want to Webhooks-enable a web application (I'm referring to the server-side of things, ie the server where the event happens and the callback is initiated from), are there libraries for this, or is this functionality typically part of the web server stack?

Or, am I looking at this incorrectly, and to implement Webhooks I simply code my application to do an HTTP POST callback based on whatever events I care about?

Howiecamp
  • 2,633
  • 6
  • 30
  • 54

1 Answers1

2

Webhooks are not a part of the web server. You have to program them yourself in your programming language of choice.

Open a socket to the right server and port, output the http-headers and the body and close the connection.

If you're using PHP, you can take a look at cURL, which makes things a bit easier.

edwin
  • 2,431
  • 18
  • 16
  • 1
    So is this part essentially correct? "...to implement Webhooks I simply code my application to do an HTTP POST callback based on whatever events I care about?" with the key part being it's up to me to code up the event handling + subsequent http post logic myself. – Howiecamp May 08 '10 at 18:40
  • 1
    Yes. Assuming the "HTTP POST callback" is a callback and was the result of an event on the remote server. And assuming with "code up the event handling" you don't mean event handling on the remote server. – edwin May 08 '10 at 21:18
  • A webhook server is actually more complicated than just sending HTTP messages because it needs to implement a retry mechanism to make sure the calls are actually getting to the destination. – Florin Dumitrescu Nov 20 '12 at 17:03