How can we make a http get request from a plugin

Hi,
I am trying to hit my backend flask python server from the plugin which is integrated with 3D slicer but due to some reasons its not working. Kindly help me out how I can achieve it

You can use the requests package from python to access http endpoints.

I tried , as I am working from an organization I guess I am not able to hit the end point, but the same URL works fine when I perform curl

Maybe there’s a proxy or other special case. You can debug this with python outside of slicer using various http packages or options and then whatever you find that works should also work inside Slicer.

Hi @pieper I tried the URL from browser and through curl command, both worked fine, but through slicer its not hitting the URL

You should use the same python packages outside of slicer for testing and then use that same approach inside slicer.

Hi @pieper The issue was with VPN which was sorted and the HTTP get request is working thanks