Does webhook work when testing locally?
I am trying to test serverless worker locally and everything runs fine except it doesn't call the webhook I provided in the test_input.json file. Here is an example of the JSON I am sending is this correct for calling a webhook?
{
"input": {
"sample": "testvalue"
},
"webhook": "https://myhost.com/log"
}
Thanks! 🙂
10 Replies
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
yes it is
I am able to hit the URL using Postman. It seems as if the webhook is not being called.
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Not how it is configured right now. I am just testing if bare minimum to get it working.
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Nah, I don't think that would prove anything....
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
I'll run it on RP and see if it calls from there. If it does then I can add code to do the request locally. My guess is that RP itself is calling the webhook, not the python code.
I'm also interested in this. A quick try when developing locally didn't call my webhook (yes, it's internet-facing and accessible).
I know it doesn't fire when testing locally with the test_input.json. I have not tested it with the rp_serve_api method. I ended up adding code into my image that detects it is running locally and calls the webhook provided in the job JSON.