Question

I have an aplicattion that makes local requests http. This application also needs to make an external request http. But the server that application is located do not accept external calls. So I created a enviromnet variable 'http_proxy', but it intercept my local request http.

What I need is: my external request use to 'http_proxy' and my local request do not use to 'http_proxy'.

For local request Im using Django Rest Framework. For external request Im using SOAPpy. (If here I could set the 'http_proxy' environment variable it should be good!)

Here is my SOAPpy request:

proxy = 'https://username:password@instance.servicecom/table.do?SOAP'
server = SOAPProxy(proxy, 'http://www.service.com/')
Was it helpful?

Solution

My solution was to change the lib.

I was using SOAPpy, now Im using SUDS and worked.

For some reason the param http_proxy in SOAPpy was using the proxy incorrectly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top