I have two http requests in my application, but I want only one use 'http_proxy'

190 views Asked by At

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:[email protected]/table.do?SOAP'
server = SOAPProxy(proxy, 'http://www.service.com/')
1

There are 1 answers

0
brunozrk On BEST ANSWER

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.