1
프록시 뒤에있을 때 작동하지만 프록시를 사용할 때 작동하지 않는 간단한 코드가 있습니다. 그렇다면 WSDL.Proxy
클래스의 생성자에서 http_proxy
을 통해 연결해야한다고 지정할 수있는 방법이 있습니까? 나는 밖으로 시도했습니다 ideone.py.파이썬 HTTP 프록시 뒤에있는 WSDL.Proxy
프록시 뒤에있을 때 작동하지만 프록시를 사용할 때 작동하지 않는 간단한 코드가 있습니다. 그렇다면 WSDL.Proxy
클래스의 생성자에서 http_proxy
을 통해 연결해야한다고 지정할 수있는 방법이 있습니까? 나는 밖으로 시도했습니다 ideone.py.파이썬 HTTP 프록시 뒤에있는 WSDL.Proxy
당신은 ideone.py
에 다음 패치를 적용해야합니다 :
diff --git a/ideone.py b/ideone.py
index fffdf27..b15abef 100644
--- a/ideone.py
+++ b/ideone.py
@@ -42,10 +42,10 @@ def getError(response):
class IdeOne:
- def __init__(self, user='test', password='test'):
+ def __init__(self, user='test', password='test', **kwargs):
self._user = user
self._password = password
- self._wsdlObject = WSDL.Proxy('http://ideone.com/api/1/service.wsdl')
+ self._wsdlObject = WSDL.Proxy('http://ideone.com/api/1/service.wsdl', **kwargs)
def testFunction(self):
response = self._wsdlObject.testFunction(self._user, self._password)
이 내부 Client.SOAPProxy
인스턴스를 생성하는 데 사용되는 WSDL.Proxy
에 키워드 인수를 전달하실 수 있습니다. Client.SOAPProxy
의 키워드 인수는 http_proxy
이므로 패치를 적용한 후 IdeOne(user='test', password='test', http_proxy='the.http.proxy')
이 작동해야합니다.