4 ms·
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.
by ihsw 13y ago
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
- rdtsc 13y agoI think I understand now, thank you for explaining!