英文:
Webhook listening in Delphi
问题
我正在尝试在Delphi中设置一个应用程序,用于接收WhatsApp-GupShup API的Web钩子。我之前已经处理过API,但没有处理过Web钩子,所以希望能得到一些指导。
我已经设置了一个托管API的Web模块,并创建了一个操作URL进行测试,但当我在GupShup API中使用它时,我的断点都没有触发,测试URL时显示'Callback set failed'。如果我尝试从浏览器访问URL,它可以正常工作并触发我的断点。我在这里看到GupShup将向URL发送一个带有演示机器人参数的GET请求,但如上所述,我的断点并没有触发,所以我陷入了困境。是否有人对我的情况有任何想法,并有关如何从Delphi应用程序接收Web钩子的建议吗?
英文:
I am trying to set up an application that will receive the web hooks from the WhatsApp-GupShup API in Delphi.
I have worked on API's before, but not on web hooks so some guidance will be much appreciated.
I have set up a Web Module that hosts an API and have created an Action URL to test, but when I use it in the GupShup API, none of my breakpoints fire and I get 'Callback set failed' when I test the URL.
If I try access the URL from my browser, it works and my breakpoints fire.
I have read on here that GupShup will send a GET request to the URL, with parameters for a demo bot, but as stated above my breakpoints don't fire, so I am at a standstill.
Does anyone have an idea on what my situation could be, and any advice on trying to receive web hooks from a Delphi application?
答案1
得分: 1
如果我尝试从浏览器访问该URL,它可以正常工作。
浏览器和Web模块运行在相同的网络中,因此浏览器发出的GET请求会触发Web模块的操作。
如果从GupShup发送GET请求,除非计算机可以接受来自互联网的传入连接,否则不会到达您的Web模块。
(如何使Web应用程序可以从互联网访问是一个不同的话题。)
英文:
> If I try access the URL from my browser, it works
The browser and the Web module are running in the same network so the GET request from the browser triggers the web module action.
If the GET request is sent from GupShup, it will not reach your web module unless the computer is accessible for incoming connectionns from the Internet.
(How to make a web application accessible from the Internet is a different topic.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论