views:

41

answers:

1

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?

+1  A: 

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
@edwin - 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
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