I have a question about the usage of the following settings:
[integrations]
# To override, add any parameter to your specific integration section
http_proxy=<PROXY URL>
https_proxy=<PROXY URL>
timeout=120
The above is described in
https://www.ibm.com/support/knowledgecenter/SSBRUQ_38.0.0/doc/apps/proxy.htmlI'm developing the application which invoke a internet page.
(1) If I code proxy in the function processor as follows, I got the response from the internet page successfully.
- function processor
:
proxies = {
'http' : 'http://<proxy-host>:<proxy-port>',
'https' : 'http://<proxy-host>:<proxy-port>'
}
url = "http://<internet-page>"
res = requests.get(url,proxies=proxies)
:
(2) If I specify proxy settings in app.config and code without proxy in the function processor, I got the timeout error.
- app.config
[integrations]
http_proxy=http://<proxy-host>:<proxy-port>
https_proxy=http://<proxy-host>:<proxy-port>
timeout=120
- function processor
url = "http://<internet-page>"
res = requests.get(url)
----
In addition I tried to display a value from function processor as follows but got the error "KeyError: 'http_proxy'".
log.info("http_proxy: %s", self.options["http_proxy"])
So I wonder how I use the proxy settings in app.config for the application. Any suggestions would be appreciated
------------------------------
Yohji Amano
------------------------------