Can a VS Code Extension Listen for HTTP Requests from External Sources?

27 Views Asked by At

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!

1

There are 1 best solutions below

0
h0tfus3 On

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.