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
Hmm it should call, is your host accessible from the internet
yes it is
I am able to hit the URL using Postman. It seems as if the webhook is not being called.
Doesn't need any auth?
try reporting this on runpod's support from the website's contact
Not how it is configured right now. I am just testing if bare minimum to get it working.
want me to try to hit your webhook endpoint?
Nah, I don't think that would prove anything....
yeah just wanna check
make sure it can receive POST
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.