I'm developing a Visual Studio Code extension and I'm exploring the possibility of incorporating functionality to listen for HTTP requests originating from external sources. Specifically, I'm interested in scenarios where the extension can act upon incoming requests, such as callbacks from other applications utilizing HTTP APIs like webhooks.
Is it feasible to implement an HTTP listener within a VS Code extension? If so, what are the recommended approaches to achieve this?
Already looked for this kind of information in the official docs but without success. Any insights, examples, or pointers to relevant documentation would be greatly appreciated.
Thank you!
After some digging and reaching out to a dev advocate, I was pointed to this project on Github that listens for Git repository webhooks: https://github.com/mkloubert/vscode-git-notify
It seems that is indeed possible to receive external events by setting up a HTTP server listening to such requests.