Open htdvisser opened 3 years ago
This would be a useful feature, but remote servers might not like these test POSTs.
Another option to help users configure a webhook correctly is to show the last response from the remote server. The Sigfox backend does this, along with the full json body and headers. This allows one to replay the same post using a tool like Postman, at a user determined time, while running your server code in a debugger.
Example:
This would be a useful feature, but remote servers might not like these test POSTs.
That was my immediate thought too. Messages sent from the end device messaging page have a simulated: true flag in them which end points should take notice of. So perhaps that can be used here too.
Summary
When setting up a webhook configuration, we should verify that we can send webhooks to it before enabling the configuration.
What is already there? What do you see now?
Right now we have obviously incorrect webhook configurations.
What is missing? What do you want to see?
When creating a webhook, the AS should attempt to send a test payload, and only enable the webhook configuration if that succeeds.
How do you propose to implement this?
enabled
boolean to the webhook configurationenabled
fromfalse
totrue
, send a test payload, and reject the change if it does not succeed.