News for hackers. Stuff that matters.
Re:Webhooks, REST and the Open Web by ihsw on Thursday September 12, 2013 @03:24PM (#6376321)
The POST to /subscription informs the API server that there is a "webhook endpoint" that's available to respond to API events. This request happens only once.

The GET request represents the "webhook request", where the API server makes GET requests to the webhook endpoint. These requests are on-going and regularly occurring as a result of service events.

The dotted arrow at the bottom is the webhook endpoint responding to the webhook request, and many API services treat responses with 2XX code as successful, whereas 4xx and 5xx response codes are unsuccessful. In the event of an unsuccessful webhook request then the API service will make multiple attempts at sending the webhook request.

For example:

* HN comment gets posted

* webhook endpoint receives GET request with related information (eg: user id, username, comment date, comment body)

* webhook endpoint responds with 2XX indicating success

Re:Webhooks, REST and the Open Web by rdtsc on Thursday September 12, 2013 @10:56PM (#6378305)
I think I understand now, thank you for explaining!