4 ms·
It would have been interesting to read about tests for web-hooks. How do you do integration testing for example?
by mosselman 10y ago
It would have been interesting to read about tests for web-hooks. How do you do integration testing for example?
- stevekemp 10y agoIn the past when I used to support webhooks what I did was very simple: * Receive the HTTP POST submission to my hook end-point. * Save this data in a queue. * Return to the hook-caller "200 OK - $ID". This was better than trying to initiate a long-running job as a result of the hook, and meant that I could trigger "fake webhooks" just by adding data to the queue manually. I'm sure there are other approaches, but this is a flexible one that also gave the benefit of being simple. (For the queue I just used Redis.)